{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "64c956bb",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "import torch.nn as nn\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import scipy.io"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "c1682ede",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Define the LEMCell\n",
    "class LEMCell(nn.Module):\n",
    "    def __init__(self, ninp, nhid, dt):\n",
    "        super(LEMCell, self).__init__()\n",
    "        self.ninp = ninp\n",
    "        self.nhid = nhid\n",
    "        self.dt = dt\n",
    "        self.inp2hid = nn.Linear(ninp, 4 * nhid)\n",
    "        self.hid2hid = nn.Linear(nhid, 3 * nhid)\n",
    "        self.transform_z = nn.Linear(nhid, nhid)\n",
    "        self.reset_parameters()\n",
    "\n",
    "    def reset_parameters(self):\n",
    "        std = 1.0 / np.sqrt(self.nhid)\n",
    "        for w in self.parameters():\n",
    "            w.data.uniform_(-std, std)\n",
    "\n",
    "    def forward(self, x, y, z):\n",
    "        transformed_inp = self.inp2hid(x)\n",
    "        transformed_hid = self.hid2hid(y)\n",
    "        i_dt1, i_dt2, i_z, i_y = transformed_inp.chunk(4, 1)\n",
    "        h_dt1, h_dt2, h_y = transformed_hid.chunk(3, 1)\n",
    "\n",
    "        ms_dt_bar = self.dt * torch.sigmoid(i_dt1 + h_dt1)\n",
    "        ms_dt = self.dt * torch.sigmoid(i_dt2 + h_dt2)\n",
    "\n",
    "        z = (1. - ms_dt) * z + ms_dt * torch.tanh(i_y + h_y)\n",
    "        y = (1. - ms_dt_bar) * y + ms_dt_bar * torch.tanh(self.transform_z(z) + i_z)\n",
    "\n",
    "        return y, z\n",
    "\n",
    "# Define the LEM model\n",
    "class LEM(nn.Module):\n",
    "    def __init__(self, ninp, nhid, nout, dt=1.):\n",
    "        super(LEM, self).__init__()\n",
    "        self.nhid = nhid\n",
    "        self.cell = LEMCell(ninp, nhid, dt)\n",
    "        self.classifier = nn.Linear(nhid, nout)\n",
    "        self.init_weights()\n",
    "\n",
    "    def init_weights(self):\n",
    "        for name, param in self.named_parameters():\n",
    "            if 'classifier' in name and 'weight' in name:\n",
    "                nn.init.kaiming_normal_(param.data)\n",
    "\n",
    "    def forward(self, input):\n",
    "        y = input.data.new(input.size(1), self.nhid).zero_()\n",
    "        z = input.data.new(input.size(1), self.nhid).zero_()\n",
    "        for x in input:\n",
    "            y, z = self.cell(x, y, z)\n",
    "        out = self.classifier(y)\n",
    "        return out\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a982afa5",
   "metadata": {},
   "source": [
    "### PINN data importing"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "79da65b0",
   "metadata": {},
   "outputs": [],
   "source": [
    "# importing data\n",
    "\n",
    "# Load the .mat file\n",
    "mat_data = scipy.io.loadmat('burg.mat')\n",
    "\n",
    "# Access the variables stored in the .mat file\n",
    "# The variable names in the .mat file become keys in the loaded dictionary\n",
    "x = mat_data['x']\n",
    "t = mat_data['t']\n",
    "u = mat_data['u1']\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bbac9f8e",
   "metadata": {},
   "source": [
    "### Exact Solution data importing"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "9967dbae",
   "metadata": {},
   "outputs": [],
   "source": [
    "# importing data\n",
    "\n",
    "import torch\n",
    "import torch.nn as nn\n",
    "import numpy as np\n",
    "import time\n",
    "import scipy.io\n",
    "\n",
    "# Load the .mat file\n",
    "mat_data = scipy.io.loadmat('burgers_shock.mat')\n",
    "\n",
    "# Access the variables stored in the .mat file\n",
    "# The variable names in the .mat file become keys in the loaded dictionary\n",
    "x = mat_data['x']\n",
    "t = mat_data['t']\n",
    "u_1 = mat_data['usol']\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "83a01b14",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(256, 100)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Set random seed for reproducibility\n",
    "#torch.manual_seed(42)\n",
    "\n",
    "# Toy problem data\n",
    "input_size = 256\n",
    "hidden_size = 32\n",
    "output_size = 256\n",
    "sequence_length = 79\n",
    "batch_size = 1\n",
    "num_epochs = 20000\n",
    "\n",
    "# Set random seed for reproducibility\n",
    "#torch.manual_seed(42)\n",
    "u[:, 0:100].shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "0496e4a4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "test data shape (256,)\n",
      "input data shape (256, 79)\n",
      "Target data shape (256, 79)\n",
      "input tensor shape torch.Size([1, 79, 256])\n",
      "Target tensor shape torch.Size([1, 79, 256])\n"
     ]
    }
   ],
   "source": [
    "input_data = u[:,0:79]\n",
    "target_data = u[:,1:80]\n",
    "\n",
    "test_data = u[:,79]\n",
    "#test_target = u[:,80:100]\n",
    "\n",
    "print(\"test data shape\", test_data.shape)\n",
    "#print(\"test target shape\", test_target.shape)\n",
    "\n",
    "print(\"input data shape\",input_data.shape)\n",
    "print(\"Target data shape\",target_data.shape)\n",
    "\n",
    "# Convert data to tensors\n",
    "input_tensor = torch.tensor(input_data.T).view(batch_size, sequence_length, input_size).float()\n",
    "target_tensor = torch.tensor(target_data.T).view(batch_size, sequence_length, output_size).float()\n",
    "\n",
    "print(\"input tensor shape\",input_tensor.shape)\n",
    "print(\"Target tensor shape\",target_tensor.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "718d5b86",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Convert test data to tensors\n",
    "test_tensor = torch.tensor(test_data.T).view(batch_size, 1, input_size).float()\n",
    "#test_target_tensor = torch.tensor(test_target.T).view(batch_size, 20, output_size).float()\n",
    "target_tensor = torch.squeeze(target_tensor)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "d733ab9a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 10/20000, Loss: 0.3944522142410278\n",
      "Epoch: 20/20000, Loss: 0.3297334909439087\n",
      "Epoch: 30/20000, Loss: 0.2621820569038391\n",
      "Epoch: 40/20000, Loss: 0.1952804625034332\n",
      "Epoch: 50/20000, Loss: 0.1376726478338242\n",
      "Epoch: 60/20000, Loss: 0.0936740189790726\n",
      "Epoch: 70/20000, Loss: 0.0634541064500809\n",
      "Epoch: 80/20000, Loss: 0.0443493351340294\n",
      "Epoch: 90/20000, Loss: 0.0329024419188499\n",
      "Epoch: 100/20000, Loss: 0.0261302292346954\n",
      "Epoch: 110/20000, Loss: 0.0220247283577919\n",
      "Epoch: 120/20000, Loss: 0.0194247160106897\n",
      "Epoch: 130/20000, Loss: 0.0176618527621031\n",
      "Epoch: 140/20000, Loss: 0.0163477454334497\n",
      "Epoch: 150/20000, Loss: 0.0152578009292483\n",
      "Epoch: 160/20000, Loss: 0.0142612718045712\n",
      "Epoch: 170/20000, Loss: 0.0133048836141825\n",
      "Epoch: 180/20000, Loss: 0.0123672429472208\n",
      "Epoch: 190/20000, Loss: 0.0114403245970607\n",
      "Epoch: 200/20000, Loss: 0.0105259018018842\n",
      "Epoch: 210/20000, Loss: 0.0096346139907837\n",
      "Epoch: 220/20000, Loss: 0.0087813707068563\n",
      "Epoch: 230/20000, Loss: 0.0079760337248445\n",
      "Epoch: 240/20000, Loss: 0.0072266678325832\n",
      "Epoch: 250/20000, Loss: 0.0065416721627116\n",
      "Epoch: 260/20000, Loss: 0.0059147644788027\n",
      "Epoch: 270/20000, Loss: 0.0053516514599323\n",
      "Epoch: 280/20000, Loss: 0.0048483996652067\n",
      "Epoch: 290/20000, Loss: 0.0044012083671987\n",
      "Epoch: 300/20000, Loss: 0.0040043285116553\n",
      "Epoch: 310/20000, Loss: 0.0036517167463899\n",
      "Epoch: 320/20000, Loss: 0.0033404249697924\n",
      "Epoch: 330/20000, Loss: 0.0030645281076431\n",
      "Epoch: 340/20000, Loss: 0.0028196475468576\n",
      "Epoch: 350/20000, Loss: 0.0026062887627631\n",
      "Epoch: 360/20000, Loss: 0.0024086218327284\n",
      "Epoch: 370/20000, Loss: 0.0022356847766787\n",
      "Epoch: 380/20000, Loss: 0.0020838521886617\n",
      "Epoch: 390/20000, Loss: 0.0019494319567457\n",
      "Epoch: 400/20000, Loss: 0.0018303567776456\n",
      "Epoch: 410/20000, Loss: 0.0017244874034077\n",
      "Epoch: 420/20000, Loss: 0.0016301964642480\n",
      "Epoch: 430/20000, Loss: 0.0015459739370272\n",
      "Epoch: 440/20000, Loss: 0.0014732016716152\n",
      "Epoch: 450/20000, Loss: 0.0014064148999751\n",
      "Epoch: 460/20000, Loss: 0.0013437849702314\n",
      "Epoch: 470/20000, Loss: 0.0012884992174804\n",
      "Epoch: 480/20000, Loss: 0.0012389097828418\n",
      "Epoch: 490/20000, Loss: 0.0011946291197091\n",
      "Epoch: 500/20000, Loss: 0.0011545531451702\n",
      "Epoch: 510/20000, Loss: 0.0011185484472662\n",
      "Epoch: 520/20000, Loss: 0.0010862015187740\n",
      "Epoch: 530/20000, Loss: 0.0010569968726486\n",
      "Epoch: 540/20000, Loss: 0.0010287088807672\n",
      "Epoch: 550/20000, Loss: 0.0010030801640823\n",
      "Epoch: 560/20000, Loss: 0.0009800936095417\n",
      "Epoch: 570/20000, Loss: 0.0009588791872375\n",
      "Epoch: 580/20000, Loss: 0.0009392980718985\n",
      "Epoch: 590/20000, Loss: 0.0009210885036737\n",
      "Epoch: 600/20000, Loss: 0.0009041111916304\n",
      "Epoch: 610/20000, Loss: 0.0008884847629815\n",
      "Epoch: 620/20000, Loss: 0.0008785420795903\n",
      "Epoch: 630/20000, Loss: 0.0008591602090746\n",
      "Epoch: 640/20000, Loss: 0.0008460801327601\n",
      "Epoch: 650/20000, Loss: 0.0008326437673531\n",
      "Epoch: 660/20000, Loss: 0.0008203581674024\n",
      "Epoch: 670/20000, Loss: 0.0008083992870525\n",
      "Epoch: 680/20000, Loss: 0.0007968965801410\n",
      "Epoch: 690/20000, Loss: 0.0007857499294914\n",
      "Epoch: 700/20000, Loss: 0.0007749437354505\n",
      "Epoch: 710/20000, Loss: 0.0007647841703147\n",
      "Epoch: 720/20000, Loss: 0.0007631931221113\n",
      "Epoch: 730/20000, Loss: 0.0007482075598091\n",
      "Epoch: 740/20000, Loss: 0.0007352973334491\n",
      "Epoch: 750/20000, Loss: 0.0007245902088471\n",
      "Epoch: 760/20000, Loss: 0.0007148371078074\n",
      "Epoch: 770/20000, Loss: 0.0007053873268887\n",
      "Epoch: 780/20000, Loss: 0.0006958785234019\n",
      "Epoch: 790/20000, Loss: 0.0006865335744806\n",
      "Epoch: 800/20000, Loss: 0.0006772555643693\n",
      "Epoch: 810/20000, Loss: 0.0006680492078885\n",
      "Epoch: 820/20000, Loss: 0.0006589109543711\n",
      "Epoch: 830/20000, Loss: 0.0006498835282400\n",
      "Epoch: 840/20000, Loss: 0.0006501795141958\n",
      "Epoch: 850/20000, Loss: 0.0006409893976524\n",
      "Epoch: 860/20000, Loss: 0.0006256487104110\n",
      "Epoch: 870/20000, Loss: 0.0006147176027298\n",
      "Epoch: 880/20000, Loss: 0.0006053451215848\n",
      "Epoch: 890/20000, Loss: 0.0005966022145003\n",
      "Epoch: 900/20000, Loss: 0.0005878367810510\n",
      "Epoch: 910/20000, Loss: 0.0005791202420369\n",
      "Epoch: 920/20000, Loss: 0.0005704680806957\n",
      "Epoch: 930/20000, Loss: 0.0005618751747534\n",
      "Epoch: 940/20000, Loss: 0.0005533324438147\n",
      "Epoch: 950/20000, Loss: 0.0005448443698697\n",
      "Epoch: 960/20000, Loss: 0.0005364106618799\n",
      "Epoch: 970/20000, Loss: 0.0005280405166559\n",
      "Epoch: 980/20000, Loss: 0.0005203182226978\n",
      "Epoch: 990/20000, Loss: 0.0005259822355583\n",
      "Epoch: 1000/20000, Loss: 0.0005048824823461\n",
      "Epoch: 1010/20000, Loss: 0.0004961462691426\n",
      "Epoch: 1020/20000, Loss: 0.0004875003069174\n",
      "Epoch: 1030/20000, Loss: 0.0004793294356205\n",
      "Epoch: 1040/20000, Loss: 0.0004714288807008\n",
      "Epoch: 1050/20000, Loss: 0.0004635949735530\n",
      "Epoch: 1060/20000, Loss: 0.0004558541404549\n",
      "Epoch: 1070/20000, Loss: 0.0004482032672968\n",
      "Epoch: 1080/20000, Loss: 0.0004406376974657\n",
      "Epoch: 1090/20000, Loss: 0.0004331607196946\n",
      "Epoch: 1100/20000, Loss: 0.0004257786204107\n",
      "Epoch: 1110/20000, Loss: 0.0004190027248114\n",
      "Epoch: 1120/20000, Loss: 0.0004353503463790\n",
      "Epoch: 1130/20000, Loss: 0.0004045951936860\n",
      "Epoch: 1140/20000, Loss: 0.0003995009756181\n",
      "Epoch: 1150/20000, Loss: 0.0003908468061127\n",
      "Epoch: 1160/20000, Loss: 0.0003834356029984\n",
      "Epoch: 1170/20000, Loss: 0.0003767813323066\n",
      "Epoch: 1180/20000, Loss: 0.0003700466186274\n",
      "Epoch: 1190/20000, Loss: 0.0003635442990344\n",
      "Epoch: 1200/20000, Loss: 0.0003598793118726\n",
      "Epoch: 1210/20000, Loss: 0.0003508191439323\n",
      "Epoch: 1220/20000, Loss: 0.0003447373746894\n",
      "Epoch: 1230/20000, Loss: 0.0003383650619071\n",
      "Epoch: 1240/20000, Loss: 0.0003323817509227\n",
      "Epoch: 1250/20000, Loss: 0.0003279693191871\n",
      "Epoch: 1260/20000, Loss: 0.0003346363664605\n",
      "Epoch: 1270/20000, Loss: 0.0003156813618261\n",
      "Epoch: 1280/20000, Loss: 0.0003099351597484\n",
      "Epoch: 1290/20000, Loss: 0.0003043701872230\n",
      "Epoch: 1300/20000, Loss: 0.0002984740422107\n",
      "Epoch: 1310/20000, Loss: 0.0002930552291218\n",
      "Epoch: 1320/20000, Loss: 0.0002878063532989\n",
      "Epoch: 1330/20000, Loss: 0.0002826505224220\n",
      "Epoch: 1340/20000, Loss: 0.0002776600886136\n",
      "Epoch: 1350/20000, Loss: 0.0002730413689278\n",
      "Epoch: 1360/20000, Loss: 0.0002834498882294\n",
      "Epoch: 1370/20000, Loss: 0.0002709110267460\n",
      "Epoch: 1380/20000, Loss: 0.0002603108587209\n",
      "Epoch: 1390/20000, Loss: 0.0002548686752561\n",
      "Epoch: 1400/20000, Loss: 0.0002501868293621\n",
      "Epoch: 1410/20000, Loss: 0.0002454972709529\n",
      "Epoch: 1420/20000, Loss: 0.0002412650792394\n",
      "Epoch: 1430/20000, Loss: 0.0002371382142883\n",
      "Epoch: 1440/20000, Loss: 0.0002331210998818\n",
      "Epoch: 1450/20000, Loss: 0.0002291785640409\n",
      "Epoch: 1460/20000, Loss: 0.0002253503043903\n",
      "Epoch: 1470/20000, Loss: 0.0002219553425675\n",
      "Epoch: 1480/20000, Loss: 0.0002400099183433\n",
      "Epoch: 1490/20000, Loss: 0.0002263308560941\n",
      "Epoch: 1500/20000, Loss: 0.0002109512133757\n",
      "Epoch: 1510/20000, Loss: 0.0002090339112328\n",
      "Epoch: 1520/20000, Loss: 0.0002042083651759\n",
      "Epoch: 1530/20000, Loss: 0.0002011525648413\n",
      "Epoch: 1540/20000, Loss: 0.0001978478394449\n",
      "Epoch: 1550/20000, Loss: 0.0001947211567312\n",
      "Epoch: 1560/20000, Loss: 0.0001917087938637\n",
      "Epoch: 1570/20000, Loss: 0.0001887752732728\n",
      "Epoch: 1580/20000, Loss: 0.0001859147159848\n",
      "Epoch: 1590/20000, Loss: 0.0001831308327382\n",
      "Epoch: 1600/20000, Loss: 0.0001804193598218\n",
      "Epoch: 1610/20000, Loss: 0.0001778152509360\n",
      "Epoch: 1620/20000, Loss: 0.0001861496857600\n",
      "Epoch: 1630/20000, Loss: 0.0001964696712093\n",
      "Epoch: 1640/20000, Loss: 0.0001789287780412\n",
      "Epoch: 1650/20000, Loss: 0.0001720356085571\n",
      "Epoch: 1660/20000, Loss: 0.0001669632474659\n",
      "Epoch: 1670/20000, Loss: 0.0001638083049329\n",
      "Epoch: 1680/20000, Loss: 0.0001614024658920\n",
      "Epoch: 1690/20000, Loss: 0.0001592043845449\n",
      "Epoch: 1700/20000, Loss: 0.0001570910098962\n",
      "Epoch: 1710/20000, Loss: 0.0001550579909235\n",
      "Epoch: 1720/20000, Loss: 0.0001530996087240\n",
      "Epoch: 1730/20000, Loss: 0.0001511898153694\n",
      "Epoch: 1740/20000, Loss: 0.0001493344170740\n",
      "Epoch: 1750/20000, Loss: 0.0001475292228861\n",
      "Epoch: 1760/20000, Loss: 0.0001457736798329\n",
      "Epoch: 1770/20000, Loss: 0.0001440664200345\n",
      "Epoch: 1780/20000, Loss: 0.0001424060174031\n",
      "Epoch: 1790/20000, Loss: 0.0001407913223375\n",
      "Epoch: 1800/20000, Loss: 0.0001392212143401\n",
      "Epoch: 1810/20000, Loss: 0.0001376975560561\n",
      "Epoch: 1820/20000, Loss: 0.0001371591788484\n",
      "Epoch: 1830/20000, Loss: 0.0001850100816227\n",
      "Epoch: 1840/20000, Loss: 0.0001474004529882\n",
      "Epoch: 1850/20000, Loss: 0.0001376434665872\n",
      "Epoch: 1860/20000, Loss: 0.0001325517951045\n",
      "Epoch: 1870/20000, Loss: 0.0001302230666624\n",
      "Epoch: 1880/20000, Loss: 0.0001284822501475\n",
      "Epoch: 1890/20000, Loss: 0.0001270894717891\n",
      "Epoch: 1900/20000, Loss: 0.0001258522097487\n",
      "Epoch: 1910/20000, Loss: 0.0001247078034794\n",
      "Epoch: 1920/20000, Loss: 0.0001235759846168\n",
      "Epoch: 1930/20000, Loss: 0.0001224829757120\n",
      "Epoch: 1940/20000, Loss: 0.0001214190706378\n",
      "Epoch: 1950/20000, Loss: 0.0001203854699270\n",
      "Epoch: 1960/20000, Loss: 0.0001193797652377\n",
      "Epoch: 1970/20000, Loss: 0.0001184011634905\n",
      "Epoch: 1980/20000, Loss: 0.0001174488788820\n",
      "Epoch: 1990/20000, Loss: 0.0001165221183328\n",
      "Epoch: 2000/20000, Loss: 0.0001156200887635\n",
      "Epoch: 2010/20000, Loss: 0.0001147425864474\n",
      "Epoch: 2020/20000, Loss: 0.0001139555315604\n",
      "Epoch: 2030/20000, Loss: 0.0001319671428064\n",
      "Epoch: 2040/20000, Loss: 0.0001364187046420\n",
      "Epoch: 2050/20000, Loss: 0.0001175451325253\n",
      "Epoch: 2060/20000, Loss: 0.0001131936878664\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 2070/20000, Loss: 0.0001105943520088\n",
      "Epoch: 2080/20000, Loss: 0.0001094810577342\n",
      "Epoch: 2090/20000, Loss: 0.0001085990734282\n",
      "Epoch: 2100/20000, Loss: 0.0001079358044080\n",
      "Epoch: 2110/20000, Loss: 0.0001072376908269\n",
      "Epoch: 2120/20000, Loss: 0.0001065632241080\n",
      "Epoch: 2130/20000, Loss: 0.0001059204587364\n",
      "Epoch: 2140/20000, Loss: 0.0001052902152878\n",
      "Epoch: 2150/20000, Loss: 0.0001046773686539\n",
      "Epoch: 2160/20000, Loss: 0.0001040794377332\n",
      "Epoch: 2170/20000, Loss: 0.0001034958040691\n",
      "Epoch: 2180/20000, Loss: 0.0001029260020005\n",
      "Epoch: 2190/20000, Loss: 0.0001023695658660\n",
      "Epoch: 2200/20000, Loss: 0.0001018259863486\n",
      "Epoch: 2210/20000, Loss: 0.0001012948778225\n",
      "Epoch: 2220/20000, Loss: 0.0001007759419736\n",
      "Epoch: 2230/20000, Loss: 0.0001002781573334\n",
      "Epoch: 2240/20000, Loss: 0.0001014671579469\n",
      "Epoch: 2250/20000, Loss: 0.0001435351441614\n",
      "Epoch: 2260/20000, Loss: 0.0001020496347337\n",
      "Epoch: 2270/20000, Loss: 0.0001003511060844\n",
      "Epoch: 2280/20000, Loss: 0.0000989845211734\n",
      "Epoch: 2290/20000, Loss: 0.0000977500312729\n",
      "Epoch: 2300/20000, Loss: 0.0000973359492491\n",
      "Epoch: 2310/20000, Loss: 0.0000967029045569\n",
      "Epoch: 2320/20000, Loss: 0.0000962521880865\n",
      "Epoch: 2330/20000, Loss: 0.0000958379532676\n",
      "Epoch: 2340/20000, Loss: 0.0000954313145485\n",
      "Epoch: 2350/20000, Loss: 0.0000950323083089\n",
      "Epoch: 2360/20000, Loss: 0.0000946430373006\n",
      "Epoch: 2370/20000, Loss: 0.0000942611877690\n",
      "Epoch: 2380/20000, Loss: 0.0000938862867770\n",
      "Epoch: 2390/20000, Loss: 0.0000935180578381\n",
      "Epoch: 2400/20000, Loss: 0.0000931562171900\n",
      "Epoch: 2410/20000, Loss: 0.0000928004737943\n",
      "Epoch: 2420/20000, Loss: 0.0000924506020965\n",
      "Epoch: 2430/20000, Loss: 0.0000921064056456\n",
      "Epoch: 2440/20000, Loss: 0.0000917678989936\n",
      "Epoch: 2450/20000, Loss: 0.0000914756601560\n",
      "Epoch: 2460/20000, Loss: 0.0001050111459335\n",
      "Epoch: 2470/20000, Loss: 0.0001203283973155\n",
      "Epoch: 2480/20000, Loss: 0.0001020998824970\n",
      "Epoch: 2490/20000, Loss: 0.0000955365321715\n",
      "Epoch: 2500/20000, Loss: 0.0000910503222258\n",
      "Epoch: 2510/20000, Loss: 0.0000897269710549\n",
      "Epoch: 2520/20000, Loss: 0.0000893288961379\n",
      "Epoch: 2530/20000, Loss: 0.0000890185401659\n",
      "Epoch: 2540/20000, Loss: 0.0000887166825123\n",
      "Epoch: 2550/20000, Loss: 0.0000884239198058\n",
      "Epoch: 2560/20000, Loss: 0.0000881368032424\n",
      "Epoch: 2570/20000, Loss: 0.0000878515202203\n",
      "Epoch: 2580/20000, Loss: 0.0000875687692314\n",
      "Epoch: 2590/20000, Loss: 0.0000872903838172\n",
      "Epoch: 2600/20000, Loss: 0.0000870151488925\n",
      "Epoch: 2610/20000, Loss: 0.0000867427734192\n",
      "Epoch: 2620/20000, Loss: 0.0000864731700858\n",
      "Epoch: 2630/20000, Loss: 0.0000862061206135\n",
      "Epoch: 2640/20000, Loss: 0.0000859415958985\n",
      "Epoch: 2650/20000, Loss: 0.0000856793776620\n",
      "Epoch: 2660/20000, Loss: 0.0000854194222484\n",
      "Epoch: 2670/20000, Loss: 0.0000851616059663\n",
      "Epoch: 2680/20000, Loss: 0.0000849058633321\n",
      "Epoch: 2690/20000, Loss: 0.0000846520488267\n",
      "Epoch: 2700/20000, Loss: 0.0000844001042424\n",
      "Epoch: 2710/20000, Loss: 0.0000841510336613\n",
      "Epoch: 2720/20000, Loss: 0.0000841557994136\n",
      "Epoch: 2730/20000, Loss: 0.0001128788280766\n",
      "Epoch: 2740/20000, Loss: 0.0000881007727003\n",
      "Epoch: 2750/20000, Loss: 0.0000916240678634\n",
      "Epoch: 2760/20000, Loss: 0.0000838303385535\n",
      "Epoch: 2770/20000, Loss: 0.0000841567380121\n",
      "Epoch: 2780/20000, Loss: 0.0000826340765343\n",
      "Epoch: 2790/20000, Loss: 0.0000827011826914\n",
      "Epoch: 2800/20000, Loss: 0.0000839128842927\n",
      "Epoch: 2810/20000, Loss: 0.0000959207463893\n",
      "Epoch: 2820/20000, Loss: 0.0000817423861008\n",
      "Epoch: 2830/20000, Loss: 0.0000813675287645\n",
      "Epoch: 2840/20000, Loss: 0.0000813969963929\n",
      "Epoch: 2850/20000, Loss: 0.0000812578946352\n",
      "Epoch: 2860/20000, Loss: 0.0000806323951110\n",
      "Epoch: 2870/20000, Loss: 0.0000805496019893\n",
      "Epoch: 2880/20000, Loss: 0.0000806966709206\n",
      "Epoch: 2890/20000, Loss: 0.0000868567585712\n",
      "Epoch: 2900/20000, Loss: 0.0000910962262424\n",
      "Epoch: 2910/20000, Loss: 0.0000820967179607\n",
      "Epoch: 2920/20000, Loss: 0.0000795899177319\n",
      "Epoch: 2930/20000, Loss: 0.0000790807316662\n",
      "Epoch: 2940/20000, Loss: 0.0000788575052866\n",
      "Epoch: 2950/20000, Loss: 0.0000786745586083\n",
      "Epoch: 2960/20000, Loss: 0.0000783863652032\n",
      "Epoch: 2970/20000, Loss: 0.0000781476992415\n",
      "Epoch: 2980/20000, Loss: 0.0000779090478318\n",
      "Epoch: 2990/20000, Loss: 0.0000778019239078\n",
      "Epoch: 3000/20000, Loss: 0.0000824345770525\n",
      "Epoch: 3010/20000, Loss: 0.0001063899617293\n",
      "Epoch: 3020/20000, Loss: 0.0000772872808739\n",
      "Epoch: 3030/20000, Loss: 0.0000805951058283\n",
      "Epoch: 3040/20000, Loss: 0.0000766876037233\n",
      "Epoch: 3050/20000, Loss: 0.0000768744212110\n",
      "Epoch: 3060/20000, Loss: 0.0000761633127695\n",
      "Epoch: 3070/20000, Loss: 0.0000759058020776\n",
      "Epoch: 3080/20000, Loss: 0.0000756831723265\n",
      "Epoch: 3090/20000, Loss: 0.0000754475113354\n",
      "Epoch: 3100/20000, Loss: 0.0000752145351726\n",
      "Epoch: 3110/20000, Loss: 0.0000749858591007\n",
      "Epoch: 3120/20000, Loss: 0.0000747595258872\n",
      "Epoch: 3130/20000, Loss: 0.0000745312572690\n",
      "Epoch: 3140/20000, Loss: 0.0000743035852793\n",
      "Epoch: 3150/20000, Loss: 0.0000740768518881\n",
      "Epoch: 3160/20000, Loss: 0.0000739057359169\n",
      "Epoch: 3170/20000, Loss: 0.0000806543248473\n",
      "Epoch: 3180/20000, Loss: 0.0000874105317052\n",
      "Epoch: 3190/20000, Loss: 0.0000855629041325\n",
      "Epoch: 3200/20000, Loss: 0.0000766524608480\n",
      "Epoch: 3210/20000, Loss: 0.0000739434181014\n",
      "Epoch: 3220/20000, Loss: 0.0000728767481633\n",
      "Epoch: 3230/20000, Loss: 0.0000724180281395\n",
      "Epoch: 3240/20000, Loss: 0.0000721619217074\n",
      "Epoch: 3250/20000, Loss: 0.0000718784431228\n",
      "Epoch: 3260/20000, Loss: 0.0000716267022653\n",
      "Epoch: 3270/20000, Loss: 0.0000713942790753\n",
      "Epoch: 3280/20000, Loss: 0.0000711628890713\n",
      "Epoch: 3290/20000, Loss: 0.0000709321175236\n",
      "Epoch: 3300/20000, Loss: 0.0000707017388777\n",
      "Epoch: 3310/20000, Loss: 0.0000704714620952\n",
      "Epoch: 3320/20000, Loss: 0.0000702409888618\n",
      "Epoch: 3330/20000, Loss: 0.0000700103919371\n",
      "Epoch: 3340/20000, Loss: 0.0000697795549058\n",
      "Epoch: 3350/20000, Loss: 0.0000695485141478\n",
      "Epoch: 3360/20000, Loss: 0.0000693172041792\n",
      "Epoch: 3370/20000, Loss: 0.0000690856686560\n",
      "Epoch: 3380/20000, Loss: 0.0000688540967531\n",
      "Epoch: 3390/20000, Loss: 0.0000686470666551\n",
      "Epoch: 3400/20000, Loss: 0.0000731070686015\n",
      "Epoch: 3410/20000, Loss: 0.0000910210510483\n",
      "Epoch: 3420/20000, Loss: 0.0000767887540860\n",
      "Epoch: 3430/20000, Loss: 0.0000683105754433\n",
      "Epoch: 3440/20000, Loss: 0.0000694701375323\n",
      "Epoch: 3450/20000, Loss: 0.0000680536177242\n",
      "Epoch: 3460/20000, Loss: 0.0000671741508995\n",
      "Epoch: 3470/20000, Loss: 0.0000668614957249\n",
      "Epoch: 3480/20000, Loss: 0.0000666114938213\n",
      "Epoch: 3490/20000, Loss: 0.0000663704558974\n",
      "Epoch: 3500/20000, Loss: 0.0000661310114083\n",
      "Epoch: 3510/20000, Loss: 0.0000658928911434\n",
      "Epoch: 3520/20000, Loss: 0.0000656558622723\n",
      "Epoch: 3530/20000, Loss: 0.0000654192117509\n",
      "Epoch: 3540/20000, Loss: 0.0000651824302622\n",
      "Epoch: 3550/20000, Loss: 0.0000649452267680\n",
      "Epoch: 3560/20000, Loss: 0.0000647076885798\n",
      "Epoch: 3570/20000, Loss: 0.0000644697647658\n",
      "Epoch: 3580/20000, Loss: 0.0000642313898425\n",
      "Epoch: 3590/20000, Loss: 0.0000639925783616\n",
      "Epoch: 3600/20000, Loss: 0.0000637533084955\n",
      "Epoch: 3610/20000, Loss: 0.0000635135511402\n",
      "Epoch: 3620/20000, Loss: 0.0000632740411675\n",
      "Epoch: 3630/20000, Loss: 0.0000631118309684\n",
      "Epoch: 3640/20000, Loss: 0.0000786020973464\n",
      "Epoch: 3650/20000, Loss: 0.0000680170487612\n",
      "Epoch: 3660/20000, Loss: 0.0000704804042471\n",
      "Epoch: 3670/20000, Loss: 0.0000651642912999\n",
      "Epoch: 3680/20000, Loss: 0.0000621494109510\n",
      "Epoch: 3690/20000, Loss: 0.0000618602571194\n",
      "Epoch: 3700/20000, Loss: 0.0000615495300735\n",
      "Epoch: 3710/20000, Loss: 0.0000611739233136\n",
      "Epoch: 3720/20000, Loss: 0.0000609180970059\n",
      "Epoch: 3730/20000, Loss: 0.0000606645735388\n",
      "Epoch: 3740/20000, Loss: 0.0000604113010922\n",
      "Epoch: 3750/20000, Loss: 0.0000601637984801\n",
      "Epoch: 3760/20000, Loss: 0.0000599171908107\n",
      "Epoch: 3770/20000, Loss: 0.0000596700374444\n",
      "Epoch: 3780/20000, Loss: 0.0000594224366068\n",
      "Epoch: 3790/20000, Loss: 0.0000591743337282\n",
      "Epoch: 3800/20000, Loss: 0.0000589257870161\n",
      "Epoch: 3810/20000, Loss: 0.0000586767746427\n",
      "Epoch: 3820/20000, Loss: 0.0000584289518883\n",
      "Epoch: 3830/20000, Loss: 0.0000582960710744\n",
      "Epoch: 3840/20000, Loss: 0.0000741367402952\n",
      "Epoch: 3850/20000, Loss: 0.0000670653316774\n",
      "Epoch: 3860/20000, Loss: 0.0000576989004912\n",
      "Epoch: 3870/20000, Loss: 0.0000574156656512\n",
      "Epoch: 3880/20000, Loss: 0.0000571004129597\n",
      "Epoch: 3890/20000, Loss: 0.0000568576724618\n",
      "Epoch: 3900/20000, Loss: 0.0000566261587664\n",
      "Epoch: 3910/20000, Loss: 0.0000563284011150\n",
      "Epoch: 3920/20000, Loss: 0.0000559989821340\n",
      "Epoch: 3930/20000, Loss: 0.0000557268358534\n",
      "Epoch: 3940/20000, Loss: 0.0000554725666007\n",
      "Epoch: 3950/20000, Loss: 0.0000552127639821\n",
      "Epoch: 3960/20000, Loss: 0.0000549566611880\n",
      "Epoch: 3970/20000, Loss: 0.0000547000636288\n",
      "Epoch: 3980/20000, Loss: 0.0000544431059097\n",
      "Epoch: 3990/20000, Loss: 0.0000541858316865\n",
      "Epoch: 4000/20000, Loss: 0.0000539281791134\n",
      "Epoch: 4010/20000, Loss: 0.0000536700317753\n",
      "Epoch: 4020/20000, Loss: 0.0000534114369657\n",
      "Epoch: 4030/20000, Loss: 0.0000531523655809\n",
      "Epoch: 4040/20000, Loss: 0.0000528927921550\n",
      "Epoch: 4050/20000, Loss: 0.0000526327821717\n",
      "Epoch: 4060/20000, Loss: 0.0000523723247170\n",
      "Epoch: 4070/20000, Loss: 0.0000521142901562\n",
      "Epoch: 4080/20000, Loss: 0.0000523111739312\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 4090/20000, Loss: 0.0001444946828997\n",
      "Epoch: 4100/20000, Loss: 0.0000645342806820\n",
      "Epoch: 4110/20000, Loss: 0.0000586377063883\n",
      "Epoch: 4120/20000, Loss: 0.0000513248924108\n",
      "Epoch: 4130/20000, Loss: 0.0000515207721037\n",
      "Epoch: 4140/20000, Loss: 0.0000506965843670\n",
      "Epoch: 4150/20000, Loss: 0.0000501514841744\n",
      "Epoch: 4160/20000, Loss: 0.0000498943809362\n",
      "Epoch: 4170/20000, Loss: 0.0000495865206176\n",
      "Epoch: 4180/20000, Loss: 0.0000493275656481\n",
      "Epoch: 4190/20000, Loss: 0.0000490559614263\n",
      "Epoch: 4200/20000, Loss: 0.0000487896977575\n",
      "Epoch: 4210/20000, Loss: 0.0000485252094222\n",
      "Epoch: 4220/20000, Loss: 0.0000482600444229\n",
      "Epoch: 4230/20000, Loss: 0.0000479950831505\n",
      "Epoch: 4240/20000, Loss: 0.0000477299436170\n",
      "Epoch: 4250/20000, Loss: 0.0000474646440125\n",
      "Epoch: 4260/20000, Loss: 0.0000471991261293\n",
      "Epoch: 4270/20000, Loss: 0.0000469333936053\n",
      "Epoch: 4280/20000, Loss: 0.0000466674355266\n",
      "Epoch: 4290/20000, Loss: 0.0000464012664452\n",
      "Epoch: 4300/20000, Loss: 0.0000461348899989\n",
      "Epoch: 4310/20000, Loss: 0.0000458683352917\n",
      "Epoch: 4320/20000, Loss: 0.0000456015841337\n",
      "Epoch: 4330/20000, Loss: 0.0000453346619906\n",
      "Epoch: 4340/20000, Loss: 0.0000450678708148\n",
      "Epoch: 4350/20000, Loss: 0.0000448447390227\n",
      "Epoch: 4360/20000, Loss: 0.0000589078808844\n",
      "Epoch: 4370/20000, Loss: 0.0000797253233031\n",
      "Epoch: 4380/20000, Loss: 0.0000575712037971\n",
      "Epoch: 4390/20000, Loss: 0.0000468863254355\n",
      "Epoch: 4400/20000, Loss: 0.0000446249978268\n",
      "Epoch: 4410/20000, Loss: 0.0000439147661382\n",
      "Epoch: 4420/20000, Loss: 0.0000430995642091\n",
      "Epoch: 4430/20000, Loss: 0.0000428653584095\n",
      "Epoch: 4440/20000, Loss: 0.0000425166290370\n",
      "Epoch: 4450/20000, Loss: 0.0000422406483267\n",
      "Epoch: 4460/20000, Loss: 0.0000419716816396\n",
      "Epoch: 4470/20000, Loss: 0.0000417033334088\n",
      "Epoch: 4480/20000, Loss: 0.0000414379974245\n",
      "Epoch: 4490/20000, Loss: 0.0000411733053625\n",
      "Epoch: 4500/20000, Loss: 0.0000409088170272\n",
      "Epoch: 4510/20000, Loss: 0.0000406446488341\n",
      "Epoch: 4520/20000, Loss: 0.0000403806952818\n",
      "Epoch: 4530/20000, Loss: 0.0000401170036639\n",
      "Epoch: 4540/20000, Loss: 0.0000398535521526\n",
      "Epoch: 4550/20000, Loss: 0.0000395903443859\n",
      "Epoch: 4560/20000, Loss: 0.0000393273621739\n",
      "Epoch: 4570/20000, Loss: 0.0000390646564483\n",
      "Epoch: 4580/20000, Loss: 0.0000388022235711\n",
      "Epoch: 4590/20000, Loss: 0.0000385400744563\n",
      "Epoch: 4600/20000, Loss: 0.0000382782818633\n",
      "Epoch: 4610/20000, Loss: 0.0000380204182875\n",
      "Epoch: 4620/20000, Loss: 0.0000386374085792\n",
      "Epoch: 4630/20000, Loss: 0.0001543065445730\n",
      "Epoch: 4640/20000, Loss: 0.0000480500129925\n",
      "Epoch: 4650/20000, Loss: 0.0000449656290584\n",
      "Epoch: 4660/20000, Loss: 0.0000407940169680\n",
      "Epoch: 4670/20000, Loss: 0.0000374711344193\n",
      "Epoch: 4680/20000, Loss: 0.0000366037020285\n",
      "Epoch: 4690/20000, Loss: 0.0000361343372788\n",
      "Epoch: 4700/20000, Loss: 0.0000358179786417\n",
      "Epoch: 4710/20000, Loss: 0.0000355470947397\n",
      "Epoch: 4720/20000, Loss: 0.0000352803799615\n",
      "Epoch: 4730/20000, Loss: 0.0000350190421159\n",
      "Epoch: 4740/20000, Loss: 0.0000347646600858\n",
      "Epoch: 4750/20000, Loss: 0.0000345122389263\n",
      "Epoch: 4760/20000, Loss: 0.0000342602506862\n",
      "Epoch: 4770/20000, Loss: 0.0000340094084095\n",
      "Epoch: 4780/20000, Loss: 0.0000337592391588\n",
      "Epoch: 4790/20000, Loss: 0.0000335098811775\n",
      "Epoch: 4800/20000, Loss: 0.0000332612580678\n",
      "Epoch: 4810/20000, Loss: 0.0000330133916577\n",
      "Epoch: 4820/20000, Loss: 0.0000327663110511\n",
      "Epoch: 4830/20000, Loss: 0.0000325199980580\n",
      "Epoch: 4840/20000, Loss: 0.0000322745036101\n",
      "Epoch: 4850/20000, Loss: 0.0000320298131555\n",
      "Epoch: 4860/20000, Loss: 0.0000317859485222\n",
      "Epoch: 4870/20000, Loss: 0.0000315429278999\n",
      "Epoch: 4880/20000, Loss: 0.0000313009513775\n",
      "Epoch: 4890/20000, Loss: 0.0000310730101774\n",
      "Epoch: 4900/20000, Loss: 0.0000330457878590\n",
      "Epoch: 4910/20000, Loss: 0.0001254835224245\n",
      "Epoch: 4920/20000, Loss: 0.0000573214019823\n",
      "Epoch: 4930/20000, Loss: 0.0000399124583055\n",
      "Epoch: 4940/20000, Loss: 0.0000322140549542\n",
      "Epoch: 4950/20000, Loss: 0.0000301032287098\n",
      "Epoch: 4960/20000, Loss: 0.0000295738736895\n",
      "Epoch: 4970/20000, Loss: 0.0000292926706607\n",
      "Epoch: 4980/20000, Loss: 0.0000290502139251\n",
      "Epoch: 4990/20000, Loss: 0.0000288116134470\n",
      "Epoch: 5000/20000, Loss: 0.0000285720416286\n",
      "Epoch: 5010/20000, Loss: 0.0000283375811705\n",
      "Epoch: 5020/20000, Loss: 0.0000281107022602\n",
      "Epoch: 5030/20000, Loss: 0.0000278852912743\n",
      "Epoch: 5040/20000, Loss: 0.0000276612354355\n",
      "Epoch: 5050/20000, Loss: 0.0000274385984085\n",
      "Epoch: 5060/20000, Loss: 0.0000272172073892\n",
      "Epoch: 5070/20000, Loss: 0.0000269970605586\n",
      "Epoch: 5080/20000, Loss: 0.0000267781433649\n",
      "Epoch: 5090/20000, Loss: 0.0000265604467131\n",
      "Epoch: 5100/20000, Loss: 0.0000263439924311\n",
      "Epoch: 5110/20000, Loss: 0.0000261287677858\n",
      "Epoch: 5120/20000, Loss: 0.0000259148018813\n",
      "Epoch: 5130/20000, Loss: 0.0000257029478234\n",
      "Epoch: 5140/20000, Loss: 0.0000259500357060\n",
      "Epoch: 5150/20000, Loss: 0.0000611153809587\n",
      "Epoch: 5160/20000, Loss: 0.0000279970900010\n",
      "Epoch: 5170/20000, Loss: 0.0000303374017676\n",
      "Epoch: 5180/20000, Loss: 0.0000256401981460\n",
      "Epoch: 5190/20000, Loss: 0.0000251690016739\n",
      "Epoch: 5200/20000, Loss: 0.0000245576211455\n",
      "Epoch: 5210/20000, Loss: 0.0000241829984589\n",
      "Epoch: 5220/20000, Loss: 0.0000239224937104\n",
      "Epoch: 5230/20000, Loss: 0.0000237281201407\n",
      "Epoch: 5240/20000, Loss: 0.0000235170919041\n",
      "Epoch: 5250/20000, Loss: 0.0000233270166063\n",
      "Epoch: 5260/20000, Loss: 0.0000233370101341\n",
      "Epoch: 5270/20000, Loss: 0.0000341336308338\n",
      "Epoch: 5280/20000, Loss: 0.0000262408793787\n",
      "Epoch: 5290/20000, Loss: 0.0000317849589919\n",
      "Epoch: 5300/20000, Loss: 0.0000229450179177\n",
      "Epoch: 5310/20000, Loss: 0.0000232154870901\n",
      "Epoch: 5320/20000, Loss: 0.0000222147937166\n",
      "Epoch: 5330/20000, Loss: 0.0000219464291149\n",
      "Epoch: 5340/20000, Loss: 0.0000216868902498\n",
      "Epoch: 5350/20000, Loss: 0.0000214979008888\n",
      "Epoch: 5360/20000, Loss: 0.0000213054026972\n",
      "Epoch: 5370/20000, Loss: 0.0000211213900911\n",
      "Epoch: 5380/20000, Loss: 0.0000209424597415\n",
      "Epoch: 5390/20000, Loss: 0.0000207663633773\n",
      "Epoch: 5400/20000, Loss: 0.0000205924425245\n",
      "Epoch: 5410/20000, Loss: 0.0000204205643968\n",
      "Epoch: 5420/20000, Loss: 0.0000202531628020\n",
      "Epoch: 5430/20000, Loss: 0.0000202163409995\n",
      "Epoch: 5440/20000, Loss: 0.0000313789932989\n",
      "Epoch: 5450/20000, Loss: 0.0000367487555195\n",
      "Epoch: 5460/20000, Loss: 0.0000210956804949\n",
      "Epoch: 5470/20000, Loss: 0.0000212477243622\n",
      "Epoch: 5480/20000, Loss: 0.0000202023747988\n",
      "Epoch: 5490/20000, Loss: 0.0000196164328372\n",
      "Epoch: 5500/20000, Loss: 0.0000191579529201\n",
      "Epoch: 5510/20000, Loss: 0.0000188869889826\n",
      "Epoch: 5520/20000, Loss: 0.0000186911911442\n",
      "Epoch: 5530/20000, Loss: 0.0000185234330274\n",
      "Epoch: 5540/20000, Loss: 0.0000183651773114\n",
      "Epoch: 5550/20000, Loss: 0.0000182116291398\n",
      "Epoch: 5560/20000, Loss: 0.0000180621645995\n",
      "Epoch: 5570/20000, Loss: 0.0000179143135028\n",
      "Epoch: 5580/20000, Loss: 0.0000177727688424\n",
      "Epoch: 5590/20000, Loss: 0.0000178325462912\n",
      "Epoch: 5600/20000, Loss: 0.0000345122280123\n",
      "Epoch: 5610/20000, Loss: 0.0000213303646888\n",
      "Epoch: 5620/20000, Loss: 0.0000232485781453\n",
      "Epoch: 5630/20000, Loss: 0.0000206584390980\n",
      "Epoch: 5640/20000, Loss: 0.0000176527737494\n",
      "Epoch: 5650/20000, Loss: 0.0000170209459611\n",
      "Epoch: 5660/20000, Loss: 0.0000168296646734\n",
      "Epoch: 5670/20000, Loss: 0.0000165940982697\n",
      "Epoch: 5680/20000, Loss: 0.0000164360153576\n",
      "Epoch: 5690/20000, Loss: 0.0000162978922162\n",
      "Epoch: 5700/20000, Loss: 0.0000161654807016\n",
      "Epoch: 5710/20000, Loss: 0.0000160355702974\n",
      "Epoch: 5720/20000, Loss: 0.0000159078845172\n",
      "Epoch: 5730/20000, Loss: 0.0000157820250024\n",
      "Epoch: 5740/20000, Loss: 0.0000156577716552\n",
      "Epoch: 5750/20000, Loss: 0.0000155350917339\n",
      "Epoch: 5760/20000, Loss: 0.0000154137615027\n",
      "Epoch: 5770/20000, Loss: 0.0000152942302520\n",
      "Epoch: 5780/20000, Loss: 0.0000151923295562\n",
      "Epoch: 5790/20000, Loss: 0.0000164815701282\n",
      "Epoch: 5800/20000, Loss: 0.0000551328157599\n",
      "Epoch: 5810/20000, Loss: 0.0000339915895893\n",
      "Epoch: 5820/20000, Loss: 0.0000184199307114\n",
      "Epoch: 5830/20000, Loss: 0.0000161444386322\n",
      "Epoch: 5840/20000, Loss: 0.0000148240251292\n",
      "Epoch: 5850/20000, Loss: 0.0000147030696098\n",
      "Epoch: 5860/20000, Loss: 0.0000144440118675\n",
      "Epoch: 5870/20000, Loss: 0.0000142510025398\n",
      "Epoch: 5880/20000, Loss: 0.0000141194968819\n",
      "Epoch: 5890/20000, Loss: 0.0000140075781019\n",
      "Epoch: 5900/20000, Loss: 0.0000139011535794\n",
      "Epoch: 5910/20000, Loss: 0.0000137968354466\n",
      "Epoch: 5920/20000, Loss: 0.0000136952958201\n",
      "Epoch: 5930/20000, Loss: 0.0000135954251164\n",
      "Epoch: 5940/20000, Loss: 0.0000134968431666\n",
      "Epoch: 5950/20000, Loss: 0.0000134001584229\n",
      "Epoch: 5960/20000, Loss: 0.0000133414259835\n",
      "Epoch: 5970/20000, Loss: 0.0000179665803444\n",
      "Epoch: 5980/20000, Loss: 0.0000590643903706\n",
      "Epoch: 5990/20000, Loss: 0.0000257151714322\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 6000/20000, Loss: 0.0000160130512086\n",
      "Epoch: 6010/20000, Loss: 0.0000132809691422\n",
      "Epoch: 6020/20000, Loss: 0.0000129009058583\n",
      "Epoch: 6030/20000, Loss: 0.0000128622223201\n",
      "Epoch: 6040/20000, Loss: 0.0000126836721392\n",
      "Epoch: 6050/20000, Loss: 0.0000125516844491\n",
      "Epoch: 6060/20000, Loss: 0.0000124623147713\n",
      "Epoch: 6070/20000, Loss: 0.0000123736390378\n",
      "Epoch: 6080/20000, Loss: 0.0000122889896375\n",
      "Epoch: 6090/20000, Loss: 0.0000122060473586\n",
      "Epoch: 6100/20000, Loss: 0.0000121249213407\n",
      "Epoch: 6110/20000, Loss: 0.0000120451695693\n",
      "Epoch: 6120/20000, Loss: 0.0000119664737213\n",
      "Epoch: 6130/20000, Loss: 0.0000118888792713\n",
      "Epoch: 6140/20000, Loss: 0.0000118122934509\n",
      "Epoch: 6150/20000, Loss: 0.0000117367235362\n",
      "Epoch: 6160/20000, Loss: 0.0000116621213238\n",
      "Epoch: 6170/20000, Loss: 0.0000115885186460\n",
      "Epoch: 6180/20000, Loss: 0.0000115159054985\n",
      "Epoch: 6190/20000, Loss: 0.0000114478771138\n",
      "Epoch: 6200/20000, Loss: 0.0000118788466352\n",
      "Epoch: 6210/20000, Loss: 0.0000922292383621\n",
      "Epoch: 6220/20000, Loss: 0.0000194995100173\n",
      "Epoch: 6230/20000, Loss: 0.0000136001626743\n",
      "Epoch: 6240/20000, Loss: 0.0000139225576277\n",
      "Epoch: 6250/20000, Loss: 0.0000123569561765\n",
      "Epoch: 6260/20000, Loss: 0.0000113427577162\n",
      "Epoch: 6270/20000, Loss: 0.0000110474265966\n",
      "Epoch: 6280/20000, Loss: 0.0000109197453639\n",
      "Epoch: 6290/20000, Loss: 0.0000108395233838\n",
      "Epoch: 6300/20000, Loss: 0.0000107707410280\n",
      "Epoch: 6310/20000, Loss: 0.0000107069708974\n",
      "Epoch: 6320/20000, Loss: 0.0000106456936919\n",
      "Epoch: 6330/20000, Loss: 0.0000105851577246\n",
      "Epoch: 6340/20000, Loss: 0.0000105254503069\n",
      "Epoch: 6350/20000, Loss: 0.0000104669961729\n",
      "Epoch: 6360/20000, Loss: 0.0000104094715425\n",
      "Epoch: 6370/20000, Loss: 0.0000103527600004\n",
      "Epoch: 6380/20000, Loss: 0.0000102969233922\n",
      "Epoch: 6390/20000, Loss: 0.0000102441081253\n",
      "Epoch: 6400/20000, Loss: 0.0000104261935121\n",
      "Epoch: 6410/20000, Loss: 0.0000327230336552\n",
      "Epoch: 6420/20000, Loss: 0.0000118163179650\n",
      "Epoch: 6430/20000, Loss: 0.0000109929360406\n",
      "Epoch: 6440/20000, Loss: 0.0000104711180029\n",
      "Epoch: 6450/20000, Loss: 0.0000102511430669\n",
      "Epoch: 6460/20000, Loss: 0.0000100354072856\n",
      "Epoch: 6470/20000, Loss: 0.0000099538756331\n",
      "Epoch: 6480/20000, Loss: 0.0000114665026558\n",
      "Epoch: 6490/20000, Loss: 0.0000441336669610\n",
      "Epoch: 6500/20000, Loss: 0.0000197685658350\n",
      "Epoch: 6510/20000, Loss: 0.0000111590215965\n",
      "Epoch: 6520/20000, Loss: 0.0000108280601125\n",
      "Epoch: 6530/20000, Loss: 0.0000098214532045\n",
      "Epoch: 6540/20000, Loss: 0.0000095649538707\n",
      "Epoch: 6550/20000, Loss: 0.0000095369096016\n",
      "Epoch: 6560/20000, Loss: 0.0000094696351880\n",
      "Epoch: 6570/20000, Loss: 0.0000094123006420\n",
      "Epoch: 6580/20000, Loss: 0.0000093628405011\n",
      "Epoch: 6590/20000, Loss: 0.0000093228536571\n",
      "Epoch: 6600/20000, Loss: 0.0000093341704996\n",
      "Epoch: 6610/20000, Loss: 0.0000119738106150\n",
      "Epoch: 6620/20000, Loss: 0.0000532060876139\n",
      "Epoch: 6630/20000, Loss: 0.0000162832711794\n",
      "Epoch: 6640/20000, Loss: 0.0000095044588306\n",
      "Epoch: 6650/20000, Loss: 0.0000094643537523\n",
      "Epoch: 6660/20000, Loss: 0.0000095041477834\n",
      "Epoch: 6670/20000, Loss: 0.0000092413483799\n",
      "Epoch: 6680/20000, Loss: 0.0000090281109806\n",
      "Epoch: 6690/20000, Loss: 0.0000089686645879\n",
      "Epoch: 6700/20000, Loss: 0.0000089273125923\n",
      "Epoch: 6710/20000, Loss: 0.0000088853612397\n",
      "Epoch: 6720/20000, Loss: 0.0000088489096015\n",
      "Epoch: 6730/20000, Loss: 0.0000088134247562\n",
      "Epoch: 6740/20000, Loss: 0.0000087791258920\n",
      "Epoch: 6750/20000, Loss: 0.0000087648295448\n",
      "Epoch: 6760/20000, Loss: 0.0000106291654447\n",
      "Epoch: 6770/20000, Loss: 0.0000840108987177\n",
      "Epoch: 6780/20000, Loss: 0.0000187401492440\n",
      "Epoch: 6790/20000, Loss: 0.0000131674632939\n",
      "Epoch: 6800/20000, Loss: 0.0000103923857750\n",
      "Epoch: 6810/20000, Loss: 0.0000089261275207\n",
      "Epoch: 6820/20000, Loss: 0.0000086483878476\n",
      "Epoch: 6830/20000, Loss: 0.0000085805640992\n",
      "Epoch: 6840/20000, Loss: 0.0000085258097897\n",
      "Epoch: 6850/20000, Loss: 0.0000084767843873\n",
      "Epoch: 6860/20000, Loss: 0.0000084417588369\n",
      "Epoch: 6870/20000, Loss: 0.0000084097755462\n",
      "Epoch: 6880/20000, Loss: 0.0000083790746430\n",
      "Epoch: 6890/20000, Loss: 0.0000083505419752\n",
      "Epoch: 6900/20000, Loss: 0.0000083222385001\n",
      "Epoch: 6910/20000, Loss: 0.0000082945080067\n",
      "Epoch: 6920/20000, Loss: 0.0000082672104327\n",
      "Epoch: 6930/20000, Loss: 0.0000082403485067\n",
      "Epoch: 6940/20000, Loss: 0.0000082144242697\n",
      "Epoch: 6950/20000, Loss: 0.0000082451851995\n",
      "Epoch: 6960/20000, Loss: 0.0000182578914973\n",
      "Epoch: 6970/20000, Loss: 0.0000465746306872\n",
      "Epoch: 6980/20000, Loss: 0.0000205125325010\n",
      "Epoch: 6990/20000, Loss: 0.0000113753585538\n",
      "Epoch: 7000/20000, Loss: 0.0000084713956312\n",
      "Epoch: 7010/20000, Loss: 0.0000083015765995\n",
      "Epoch: 7020/20000, Loss: 0.0000081241287262\n",
      "Epoch: 7030/20000, Loss: 0.0000080584895841\n",
      "Epoch: 7040/20000, Loss: 0.0000080034133134\n",
      "Epoch: 7050/20000, Loss: 0.0000079832152551\n",
      "Epoch: 7060/20000, Loss: 0.0000079548626672\n",
      "Epoch: 7070/20000, Loss: 0.0000079327273852\n",
      "Epoch: 7080/20000, Loss: 0.0000079219025793\n",
      "Epoch: 7090/20000, Loss: 0.0000081703619799\n",
      "Epoch: 7100/20000, Loss: 0.0000203053350560\n",
      "Epoch: 7110/20000, Loss: 0.0000085137144197\n",
      "Epoch: 7120/20000, Loss: 0.0000156108326337\n",
      "Epoch: 7130/20000, Loss: 0.0000081542830230\n",
      "Epoch: 7140/20000, Loss: 0.0000088216829681\n",
      "Epoch: 7150/20000, Loss: 0.0000078863095041\n",
      "Epoch: 7160/20000, Loss: 0.0000078339999163\n",
      "Epoch: 7170/20000, Loss: 0.0000077787772170\n",
      "Epoch: 7180/20000, Loss: 0.0000077301465353\n",
      "Epoch: 7190/20000, Loss: 0.0000077016402429\n",
      "Epoch: 7200/20000, Loss: 0.0000076779379015\n",
      "Epoch: 7210/20000, Loss: 0.0000076571013778\n",
      "Epoch: 7220/20000, Loss: 0.0000076379665188\n",
      "Epoch: 7230/20000, Loss: 0.0000076183205238\n",
      "Epoch: 7240/20000, Loss: 0.0000076272922342\n",
      "Epoch: 7250/20000, Loss: 0.0000133434696181\n",
      "Epoch: 7260/20000, Loss: 0.0000200221948035\n",
      "Epoch: 7270/20000, Loss: 0.0000085558585852\n",
      "Epoch: 7280/20000, Loss: 0.0000077837103163\n",
      "Epoch: 7290/20000, Loss: 0.0000076456690294\n",
      "Epoch: 7300/20000, Loss: 0.0000076584228736\n",
      "Epoch: 7310/20000, Loss: 0.0000075290067798\n",
      "Epoch: 7320/20000, Loss: 0.0000075266125350\n",
      "Epoch: 7330/20000, Loss: 0.0000076262131188\n",
      "Epoch: 7340/20000, Loss: 0.0000106560355562\n",
      "Epoch: 7350/20000, Loss: 0.0000413417328673\n",
      "Epoch: 7360/20000, Loss: 0.0000131408396555\n",
      "Epoch: 7370/20000, Loss: 0.0000078691318777\n",
      "Epoch: 7380/20000, Loss: 0.0000083356690084\n",
      "Epoch: 7390/20000, Loss: 0.0000078006723925\n",
      "Epoch: 7400/20000, Loss: 0.0000075064240264\n",
      "Epoch: 7410/20000, Loss: 0.0000074024128480\n",
      "Epoch: 7420/20000, Loss: 0.0000073546079875\n",
      "Epoch: 7430/20000, Loss: 0.0000073158380474\n",
      "Epoch: 7440/20000, Loss: 0.0000072949615060\n",
      "Epoch: 7450/20000, Loss: 0.0000072807638389\n",
      "Epoch: 7460/20000, Loss: 0.0000073519354373\n",
      "Epoch: 7470/20000, Loss: 0.0000124886391859\n",
      "Epoch: 7480/20000, Loss: 0.0000086362388174\n",
      "Epoch: 7490/20000, Loss: 0.0000088620699898\n",
      "Epoch: 7500/20000, Loss: 0.0000078761340774\n",
      "Epoch: 7510/20000, Loss: 0.0000083814747995\n",
      "Epoch: 7520/20000, Loss: 0.0000812651123852\n",
      "Epoch: 7530/20000, Loss: 0.0000112353764052\n",
      "Epoch: 7540/20000, Loss: 0.0000104358068711\n",
      "Epoch: 7550/20000, Loss: 0.0000086300015028\n",
      "Epoch: 7560/20000, Loss: 0.0000077096992754\n",
      "Epoch: 7570/20000, Loss: 0.0000074034574027\n",
      "Epoch: 7580/20000, Loss: 0.0000071751478572\n",
      "Epoch: 7590/20000, Loss: 0.0000071218223638\n",
      "Epoch: 7600/20000, Loss: 0.0000071104682320\n",
      "Epoch: 7610/20000, Loss: 0.0000070872670221\n",
      "Epoch: 7620/20000, Loss: 0.0000070697328738\n",
      "Epoch: 7630/20000, Loss: 0.0000070542305366\n",
      "Epoch: 7640/20000, Loss: 0.0000070393921305\n",
      "Epoch: 7650/20000, Loss: 0.0000070250544013\n",
      "Epoch: 7660/20000, Loss: 0.0000070108762884\n",
      "Epoch: 7670/20000, Loss: 0.0000069969578362\n",
      "Epoch: 7680/20000, Loss: 0.0000069831953624\n",
      "Epoch: 7690/20000, Loss: 0.0000069695702223\n",
      "Epoch: 7700/20000, Loss: 0.0000069560755946\n",
      "Epoch: 7710/20000, Loss: 0.0000069427710514\n",
      "Epoch: 7720/20000, Loss: 0.0000069379912020\n",
      "Epoch: 7730/20000, Loss: 0.0000087778616944\n",
      "Epoch: 7740/20000, Loss: 0.0000663884202368\n",
      "Epoch: 7750/20000, Loss: 0.0000148553344843\n",
      "Epoch: 7760/20000, Loss: 0.0000104854016172\n",
      "Epoch: 7770/20000, Loss: 0.0000086577865659\n",
      "Epoch: 7780/20000, Loss: 0.0000071975150604\n",
      "Epoch: 7790/20000, Loss: 0.0000071131648838\n",
      "Epoch: 7800/20000, Loss: 0.0000069606226134\n",
      "Epoch: 7810/20000, Loss: 0.0000068624931373\n",
      "Epoch: 7820/20000, Loss: 0.0000068434105742\n",
      "Epoch: 7830/20000, Loss: 0.0000068294107223\n",
      "Epoch: 7840/20000, Loss: 0.0000068140229814\n",
      "Epoch: 7850/20000, Loss: 0.0000067999148996\n",
      "Epoch: 7860/20000, Loss: 0.0000067867495090\n",
      "Epoch: 7870/20000, Loss: 0.0000067740602390\n",
      "Epoch: 7880/20000, Loss: 0.0000067614673753\n",
      "Epoch: 7890/20000, Loss: 0.0000067490723268\n",
      "Epoch: 7900/20000, Loss: 0.0000067368309828\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 7910/20000, Loss: 0.0000067261289587\n",
      "Epoch: 7920/20000, Loss: 0.0000068222857408\n",
      "Epoch: 7930/20000, Loss: 0.0000219775083679\n",
      "Epoch: 7940/20000, Loss: 0.0000249832792178\n",
      "Epoch: 7950/20000, Loss: 0.0000088708329713\n",
      "Epoch: 7960/20000, Loss: 0.0000074179747571\n",
      "Epoch: 7970/20000, Loss: 0.0000068929466579\n",
      "Epoch: 7980/20000, Loss: 0.0000067717805905\n",
      "Epoch: 7990/20000, Loss: 0.0000067774244599\n",
      "Epoch: 8000/20000, Loss: 0.0000067213918555\n",
      "Epoch: 8010/20000, Loss: 0.0000066495681494\n",
      "Epoch: 8020/20000, Loss: 0.0000066288830567\n",
      "Epoch: 8030/20000, Loss: 0.0000066151733336\n",
      "Epoch: 8040/20000, Loss: 0.0000065997760430\n",
      "Epoch: 8050/20000, Loss: 0.0000065873832682\n",
      "Epoch: 8060/20000, Loss: 0.0000065750718932\n",
      "Epoch: 8070/20000, Loss: 0.0000065660597102\n",
      "Epoch: 8080/20000, Loss: 0.0000067326132012\n",
      "Epoch: 8090/20000, Loss: 0.0000202556311706\n",
      "Epoch: 8100/20000, Loss: 0.0000105168155642\n",
      "Epoch: 8110/20000, Loss: 0.0000076358528531\n",
      "Epoch: 8120/20000, Loss: 0.0000066379052441\n",
      "Epoch: 8130/20000, Loss: 0.0000067029495767\n",
      "Epoch: 8140/20000, Loss: 0.0000065372087192\n",
      "Epoch: 8150/20000, Loss: 0.0000065461426857\n",
      "Epoch: 8160/20000, Loss: 0.0000064775645114\n",
      "Epoch: 8170/20000, Loss: 0.0000064671489781\n",
      "Epoch: 8180/20000, Loss: 0.0000066399343268\n",
      "Epoch: 8190/20000, Loss: 0.0000158992606885\n",
      "Epoch: 8200/20000, Loss: 0.0000106376965050\n",
      "Epoch: 8210/20000, Loss: 0.0000102244248410\n",
      "Epoch: 8220/20000, Loss: 0.0000075850366557\n",
      "Epoch: 8230/20000, Loss: 0.0000067228397711\n",
      "Epoch: 8240/20000, Loss: 0.0000066079737735\n",
      "Epoch: 8250/20000, Loss: 0.0000066251250246\n",
      "Epoch: 8260/20000, Loss: 0.0000107841815407\n",
      "Epoch: 8270/20000, Loss: 0.0000266034239758\n",
      "Epoch: 8280/20000, Loss: 0.0000083913746494\n",
      "Epoch: 8290/20000, Loss: 0.0000072095376709\n",
      "Epoch: 8300/20000, Loss: 0.0000071783579187\n",
      "Epoch: 8310/20000, Loss: 0.0000066796887950\n",
      "Epoch: 8320/20000, Loss: 0.0000064410319283\n",
      "Epoch: 8330/20000, Loss: 0.0000063574834712\n",
      "Epoch: 8340/20000, Loss: 0.0000063048732954\n",
      "Epoch: 8350/20000, Loss: 0.0000062749140852\n",
      "Epoch: 8360/20000, Loss: 0.0000062708704718\n",
      "Epoch: 8370/20000, Loss: 0.0000063017146203\n",
      "Epoch: 8380/20000, Loss: 0.0000081183297880\n",
      "Epoch: 8390/20000, Loss: 0.0000266554106929\n",
      "Epoch: 8400/20000, Loss: 0.0000077035556387\n",
      "Epoch: 8410/20000, Loss: 0.0000069728889684\n",
      "Epoch: 8420/20000, Loss: 0.0000069315901783\n",
      "Epoch: 8430/20000, Loss: 0.0000063280017457\n",
      "Epoch: 8440/20000, Loss: 0.0000062956523834\n",
      "Epoch: 8450/20000, Loss: 0.0000062339736360\n",
      "Epoch: 8460/20000, Loss: 0.0000062020881160\n",
      "Epoch: 8470/20000, Loss: 0.0000061951864154\n",
      "Epoch: 8480/20000, Loss: 0.0000065735125645\n",
      "Epoch: 8490/20000, Loss: 0.0000188712747331\n",
      "Epoch: 8500/20000, Loss: 0.0000068769372774\n",
      "Epoch: 8510/20000, Loss: 0.0000110343098640\n",
      "Epoch: 8520/20000, Loss: 0.0000075246839515\n",
      "Epoch: 8530/20000, Loss: 0.0000061857531364\n",
      "Epoch: 8540/20000, Loss: 0.0000062737544795\n",
      "Epoch: 8550/20000, Loss: 0.0000061855498643\n",
      "Epoch: 8560/20000, Loss: 0.0000061087916947\n",
      "Epoch: 8570/20000, Loss: 0.0000060672878135\n",
      "Epoch: 8580/20000, Loss: 0.0000060432544160\n",
      "Epoch: 8590/20000, Loss: 0.0000060657989707\n",
      "Epoch: 8600/20000, Loss: 0.0000073945434451\n",
      "Epoch: 8610/20000, Loss: 0.0000163778458955\n",
      "Epoch: 8620/20000, Loss: 0.0000073169521784\n",
      "Epoch: 8630/20000, Loss: 0.0000083004870248\n",
      "Epoch: 8640/20000, Loss: 0.0000080558693298\n",
      "Epoch: 8650/20000, Loss: 0.0000112797579277\n",
      "Epoch: 8660/20000, Loss: 0.0000075610269050\n",
      "Epoch: 8670/20000, Loss: 0.0000066261382017\n",
      "Epoch: 8680/20000, Loss: 0.0000072117518357\n",
      "Epoch: 8690/20000, Loss: 0.0000078616603787\n",
      "Epoch: 8700/20000, Loss: 0.0000100176112028\n",
      "Epoch: 8710/20000, Loss: 0.0000097909432952\n",
      "Epoch: 8720/20000, Loss: 0.0000073450273703\n",
      "Epoch: 8730/20000, Loss: 0.0000085594192569\n",
      "Epoch: 8740/20000, Loss: 0.0000065718054429\n",
      "Epoch: 8750/20000, Loss: 0.0000085716237663\n",
      "Epoch: 8760/20000, Loss: 0.0000142307180795\n",
      "Epoch: 8770/20000, Loss: 0.0000075139155342\n",
      "Epoch: 8780/20000, Loss: 0.0000073867850006\n",
      "Epoch: 8790/20000, Loss: 0.0000066465522650\n",
      "Epoch: 8800/20000, Loss: 0.0000059741696532\n",
      "Epoch: 8810/20000, Loss: 0.0000059516441979\n",
      "Epoch: 8820/20000, Loss: 0.0000071492681855\n",
      "Epoch: 8830/20000, Loss: 0.0000263338861259\n",
      "Epoch: 8840/20000, Loss: 0.0000108120839286\n",
      "Epoch: 8850/20000, Loss: 0.0000076265114330\n",
      "Epoch: 8860/20000, Loss: 0.0000067379937718\n",
      "Epoch: 8870/20000, Loss: 0.0000059619383137\n",
      "Epoch: 8880/20000, Loss: 0.0000058805203480\n",
      "Epoch: 8890/20000, Loss: 0.0000057294760154\n",
      "Epoch: 8900/20000, Loss: 0.0000057822744566\n",
      "Epoch: 8910/20000, Loss: 0.0000066670199885\n",
      "Epoch: 8920/20000, Loss: 0.0000261591867456\n",
      "Epoch: 8930/20000, Loss: 0.0000110059063445\n",
      "Epoch: 8940/20000, Loss: 0.0000090361290859\n",
      "Epoch: 8950/20000, Loss: 0.0000065914673542\n",
      "Epoch: 8960/20000, Loss: 0.0000060221477725\n",
      "Epoch: 8970/20000, Loss: 0.0000058073865148\n",
      "Epoch: 8980/20000, Loss: 0.0000057055449361\n",
      "Epoch: 8990/20000, Loss: 0.0000056379503803\n",
      "Epoch: 9000/20000, Loss: 0.0000056249018598\n",
      "Epoch: 9010/20000, Loss: 0.0000063052880250\n",
      "Epoch: 9020/20000, Loss: 0.0000245886421908\n",
      "Epoch: 9030/20000, Loss: 0.0000115311531772\n",
      "Epoch: 9040/20000, Loss: 0.0000059360745581\n",
      "Epoch: 9050/20000, Loss: 0.0000062562517087\n",
      "Epoch: 9060/20000, Loss: 0.0000056554449657\n",
      "Epoch: 9070/20000, Loss: 0.0000059456310737\n",
      "Epoch: 9080/20000, Loss: 0.0000235630777752\n",
      "Epoch: 9090/20000, Loss: 0.0000118461721286\n",
      "Epoch: 9100/20000, Loss: 0.0000087983517005\n",
      "Epoch: 9110/20000, Loss: 0.0000069985112532\n",
      "Epoch: 9120/20000, Loss: 0.0000056231347116\n",
      "Epoch: 9130/20000, Loss: 0.0000056891344684\n",
      "Epoch: 9140/20000, Loss: 0.0000055111972870\n",
      "Epoch: 9150/20000, Loss: 0.0000054626962083\n",
      "Epoch: 9160/20000, Loss: 0.0000054378265304\n",
      "Epoch: 9170/20000, Loss: 0.0000054154711506\n",
      "Epoch: 9180/20000, Loss: 0.0000054001570788\n",
      "Epoch: 9190/20000, Loss: 0.0000053860280786\n",
      "Epoch: 9200/20000, Loss: 0.0000053758640206\n",
      "Epoch: 9210/20000, Loss: 0.0000054750507843\n",
      "Epoch: 9220/20000, Loss: 0.0000152967495524\n",
      "Epoch: 9230/20000, Loss: 0.0000254360456893\n",
      "Epoch: 9240/20000, Loss: 0.0000087543676273\n",
      "Epoch: 9250/20000, Loss: 0.0000063523502831\n",
      "Epoch: 9260/20000, Loss: 0.0000057974393712\n",
      "Epoch: 9270/20000, Loss: 0.0000054172196542\n",
      "Epoch: 9280/20000, Loss: 0.0000053961589401\n",
      "Epoch: 9290/20000, Loss: 0.0000053110284171\n",
      "Epoch: 9300/20000, Loss: 0.0000053084759202\n",
      "Epoch: 9310/20000, Loss: 0.0000054529905356\n",
      "Epoch: 9320/20000, Loss: 0.0000090594830908\n",
      "Epoch: 9330/20000, Loss: 0.0000265399667114\n",
      "Epoch: 9340/20000, Loss: 0.0000080951322161\n",
      "Epoch: 9350/20000, Loss: 0.0000053507428674\n",
      "Epoch: 9360/20000, Loss: 0.0000057143429331\n",
      "Epoch: 9370/20000, Loss: 0.0000055075074670\n",
      "Epoch: 9380/20000, Loss: 0.0000053096068768\n",
      "Epoch: 9390/20000, Loss: 0.0000052088626035\n",
      "Epoch: 9400/20000, Loss: 0.0000051640186030\n",
      "Epoch: 9410/20000, Loss: 0.0000051853799050\n",
      "Epoch: 9420/20000, Loss: 0.0000062949825406\n",
      "Epoch: 9430/20000, Loss: 0.0000165019937413\n",
      "Epoch: 9440/20000, Loss: 0.0000056031317399\n",
      "Epoch: 9450/20000, Loss: 0.0000063160264290\n",
      "Epoch: 9460/20000, Loss: 0.0000052238906392\n",
      "Epoch: 9470/20000, Loss: 0.0000057192178247\n",
      "Epoch: 9480/20000, Loss: 0.0000213302446355\n",
      "Epoch: 9490/20000, Loss: 0.0000093541802926\n",
      "Epoch: 9500/20000, Loss: 0.0000094030201581\n",
      "Epoch: 9510/20000, Loss: 0.0000052146629059\n",
      "Epoch: 9520/20000, Loss: 0.0000053865169320\n",
      "Epoch: 9530/20000, Loss: 0.0000052685854826\n",
      "Epoch: 9540/20000, Loss: 0.0000050811127039\n",
      "Epoch: 9550/20000, Loss: 0.0000050182757150\n",
      "Epoch: 9560/20000, Loss: 0.0000049950072025\n",
      "Epoch: 9570/20000, Loss: 0.0000049782361202\n",
      "Epoch: 9580/20000, Loss: 0.0000049849727475\n",
      "Epoch: 9590/20000, Loss: 0.0000059886351664\n",
      "Epoch: 9600/20000, Loss: 0.0000237543972617\n",
      "Epoch: 9610/20000, Loss: 0.0000069043194344\n",
      "Epoch: 9620/20000, Loss: 0.0000066117595452\n",
      "Epoch: 9630/20000, Loss: 0.0000053276494327\n",
      "Epoch: 9640/20000, Loss: 0.0000051657743825\n",
      "Epoch: 9650/20000, Loss: 0.0000050301077863\n",
      "Epoch: 9660/20000, Loss: 0.0000049003306231\n",
      "Epoch: 9670/20000, Loss: 0.0000048748361223\n",
      "Epoch: 9680/20000, Loss: 0.0000049199388741\n",
      "Epoch: 9690/20000, Loss: 0.0000059460612647\n",
      "Epoch: 9700/20000, Loss: 0.0000320796971209\n",
      "Epoch: 9710/20000, Loss: 0.0000146205238707\n",
      "Epoch: 9720/20000, Loss: 0.0000073151727520\n",
      "Epoch: 9730/20000, Loss: 0.0000050969565564\n",
      "Epoch: 9740/20000, Loss: 0.0000050424964684\n",
      "Epoch: 9750/20000, Loss: 0.0000049181494433\n",
      "Epoch: 9760/20000, Loss: 0.0000048239080570\n",
      "Epoch: 9770/20000, Loss: 0.0000047713169806\n",
      "Epoch: 9780/20000, Loss: 0.0000047421794989\n",
      "Epoch: 9790/20000, Loss: 0.0000047580620048\n",
      "Epoch: 9800/20000, Loss: 0.0000057988336266\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 9810/20000, Loss: 0.0000189968213817\n",
      "Epoch: 9820/20000, Loss: 0.0000053805129028\n",
      "Epoch: 9830/20000, Loss: 0.0000064180608206\n",
      "Epoch: 9840/20000, Loss: 0.0000049053960538\n",
      "Epoch: 9850/20000, Loss: 0.0000051556512517\n",
      "Epoch: 9860/20000, Loss: 0.0000123771696963\n",
      "Epoch: 9870/20000, Loss: 0.0000052449790928\n",
      "Epoch: 9880/20000, Loss: 0.0000063964066612\n",
      "Epoch: 9890/20000, Loss: 0.0000059051380958\n",
      "Epoch: 9900/20000, Loss: 0.0000050542689678\n",
      "Epoch: 9910/20000, Loss: 0.0000083780578279\n",
      "Epoch: 9920/20000, Loss: 0.0000092279369710\n",
      "Epoch: 9930/20000, Loss: 0.0000068302638283\n",
      "Epoch: 9940/20000, Loss: 0.0000057500778894\n",
      "Epoch: 9950/20000, Loss: 0.0000048334818530\n",
      "Epoch: 9960/20000, Loss: 0.0000045642636906\n",
      "Epoch: 9970/20000, Loss: 0.0000045953893277\n",
      "Epoch: 9980/20000, Loss: 0.0000045992132982\n",
      "Epoch: 9990/20000, Loss: 0.0000049182549446\n",
      "Epoch: 10000/20000, Loss: 0.0000118442230814\n",
      "Epoch: 10010/20000, Loss: 0.0000112502284537\n",
      "Epoch: 10020/20000, Loss: 0.0000052925565797\n",
      "Epoch: 10030/20000, Loss: 0.0000050263706726\n",
      "Epoch: 10040/20000, Loss: 0.0000048251949920\n",
      "Epoch: 10050/20000, Loss: 0.0000046065570132\n",
      "Epoch: 10060/20000, Loss: 0.0000044678472477\n",
      "Epoch: 10070/20000, Loss: 0.0000044448329390\n",
      "Epoch: 10080/20000, Loss: 0.0000044755338422\n",
      "Epoch: 10090/20000, Loss: 0.0000053646090237\n",
      "Epoch: 10100/20000, Loss: 0.0000165670371644\n",
      "Epoch: 10110/20000, Loss: 0.0000108114618342\n",
      "Epoch: 10120/20000, Loss: 0.0000047458247536\n",
      "Epoch: 10130/20000, Loss: 0.0000048930787671\n",
      "Epoch: 10140/20000, Loss: 0.0000045955143833\n",
      "Epoch: 10150/20000, Loss: 0.0000044244857236\n",
      "Epoch: 10160/20000, Loss: 0.0000045804822548\n",
      "Epoch: 10170/20000, Loss: 0.0000077695149230\n",
      "Epoch: 10180/20000, Loss: 0.0000189053007489\n",
      "Epoch: 10190/20000, Loss: 0.0000065704525696\n",
      "Epoch: 10200/20000, Loss: 0.0000048355277613\n",
      "Epoch: 10210/20000, Loss: 0.0000048495007832\n",
      "Epoch: 10220/20000, Loss: 0.0000043849231588\n",
      "Epoch: 10230/20000, Loss: 0.0000042638653213\n",
      "Epoch: 10240/20000, Loss: 0.0000042670758376\n",
      "Epoch: 10250/20000, Loss: 0.0000047464413910\n",
      "Epoch: 10260/20000, Loss: 0.0000214195570152\n",
      "Epoch: 10270/20000, Loss: 0.0000091879373940\n",
      "Epoch: 10280/20000, Loss: 0.0000070937808232\n",
      "Epoch: 10290/20000, Loss: 0.0000056541980484\n",
      "Epoch: 10300/20000, Loss: 0.0000043748841563\n",
      "Epoch: 10310/20000, Loss: 0.0000042264964577\n",
      "Epoch: 10320/20000, Loss: 0.0000042052342906\n",
      "Epoch: 10330/20000, Loss: 0.0000041506596062\n",
      "Epoch: 10340/20000, Loss: 0.0000041239140955\n",
      "Epoch: 10350/20000, Loss: 0.0000041201842578\n",
      "Epoch: 10360/20000, Loss: 0.0000045426872930\n",
      "Epoch: 10370/20000, Loss: 0.0000164591456269\n",
      "Epoch: 10380/20000, Loss: 0.0000061883970375\n",
      "Epoch: 10390/20000, Loss: 0.0000051162833188\n",
      "Epoch: 10400/20000, Loss: 0.0000042781762204\n",
      "Epoch: 10410/20000, Loss: 0.0000059808967308\n",
      "Epoch: 10420/20000, Loss: 0.0000422419871029\n",
      "Epoch: 10430/20000, Loss: 0.0000069029924816\n",
      "Epoch: 10440/20000, Loss: 0.0000068533286139\n",
      "Epoch: 10450/20000, Loss: 0.0000046125901463\n",
      "Epoch: 10460/20000, Loss: 0.0000042335236685\n",
      "Epoch: 10470/20000, Loss: 0.0000041462062654\n",
      "Epoch: 10480/20000, Loss: 0.0000040162576624\n",
      "Epoch: 10490/20000, Loss: 0.0000039666397242\n",
      "Epoch: 10500/20000, Loss: 0.0000039534156713\n",
      "Epoch: 10510/20000, Loss: 0.0000039424876377\n",
      "Epoch: 10520/20000, Loss: 0.0000039776437006\n",
      "Epoch: 10530/20000, Loss: 0.0000069478919613\n",
      "Epoch: 10540/20000, Loss: 0.0000066977427196\n",
      "Epoch: 10550/20000, Loss: 0.0000055112250266\n",
      "Epoch: 10560/20000, Loss: 0.0000047336857278\n",
      "Epoch: 10570/20000, Loss: 0.0000040231902858\n",
      "Epoch: 10580/20000, Loss: 0.0000038939124352\n",
      "Epoch: 10590/20000, Loss: 0.0000039269643821\n",
      "Epoch: 10600/20000, Loss: 0.0000050868738981\n",
      "Epoch: 10610/20000, Loss: 0.0000452139647678\n",
      "Epoch: 10620/20000, Loss: 0.0000124780908664\n",
      "Epoch: 10630/20000, Loss: 0.0000072275229286\n",
      "Epoch: 10640/20000, Loss: 0.0000039945334720\n",
      "Epoch: 10650/20000, Loss: 0.0000043741242735\n",
      "Epoch: 10660/20000, Loss: 0.0000038598009269\n",
      "Epoch: 10670/20000, Loss: 0.0000038505145312\n",
      "Epoch: 10680/20000, Loss: 0.0000037716545194\n",
      "Epoch: 10690/20000, Loss: 0.0000037636925754\n",
      "Epoch: 10700/20000, Loss: 0.0000037469833387\n",
      "Epoch: 10710/20000, Loss: 0.0000037314093788\n",
      "Epoch: 10720/20000, Loss: 0.0000037189286104\n",
      "Epoch: 10730/20000, Loss: 0.0000037104646253\n",
      "Epoch: 10740/20000, Loss: 0.0000038647922338\n",
      "Epoch: 10750/20000, Loss: 0.0000182071089512\n",
      "Epoch: 10760/20000, Loss: 0.0000155575053213\n",
      "Epoch: 10770/20000, Loss: 0.0000041352018343\n",
      "Epoch: 10780/20000, Loss: 0.0000043683949116\n",
      "Epoch: 10790/20000, Loss: 0.0000043540471779\n",
      "Epoch: 10800/20000, Loss: 0.0000038445468817\n",
      "Epoch: 10810/20000, Loss: 0.0000036696610550\n",
      "Epoch: 10820/20000, Loss: 0.0000038467087506\n",
      "Epoch: 10830/20000, Loss: 0.0000068222398113\n",
      "Epoch: 10840/20000, Loss: 0.0000041156422412\n",
      "Epoch: 10850/20000, Loss: 0.0000037549427816\n",
      "Epoch: 10860/20000, Loss: 0.0000039473975448\n",
      "Epoch: 10870/20000, Loss: 0.0000062918456933\n",
      "Epoch: 10880/20000, Loss: 0.0000067869100349\n",
      "Epoch: 10890/20000, Loss: 0.0000044815537876\n",
      "Epoch: 10900/20000, Loss: 0.0000042831479732\n",
      "Epoch: 10910/20000, Loss: 0.0000037479562707\n",
      "Epoch: 10920/20000, Loss: 0.0000041361531657\n",
      "Epoch: 10930/20000, Loss: 0.0000086167110567\n",
      "Epoch: 10940/20000, Loss: 0.0000113905334729\n",
      "Epoch: 10950/20000, Loss: 0.0000061956984609\n",
      "Epoch: 10960/20000, Loss: 0.0000041616358430\n",
      "Epoch: 10970/20000, Loss: 0.0000036946410091\n",
      "Epoch: 10980/20000, Loss: 0.0000037030918065\n",
      "Epoch: 10990/20000, Loss: 0.0000035616176319\n",
      "Epoch: 11000/20000, Loss: 0.0000042809028855\n",
      "Epoch: 11010/20000, Loss: 0.0000114503736768\n",
      "Epoch: 11020/20000, Loss: 0.0000115302882477\n",
      "Epoch: 11030/20000, Loss: 0.0000048200799938\n",
      "Epoch: 11040/20000, Loss: 0.0000036785015709\n",
      "Epoch: 11050/20000, Loss: 0.0000036151548102\n",
      "Epoch: 11060/20000, Loss: 0.0000035264540656\n",
      "Epoch: 11070/20000, Loss: 0.0000039978613131\n",
      "Epoch: 11080/20000, Loss: 0.0000147107084558\n",
      "Epoch: 11090/20000, Loss: 0.0000109207876449\n",
      "Epoch: 11100/20000, Loss: 0.0000069151628850\n",
      "Epoch: 11110/20000, Loss: 0.0000039485498746\n",
      "Epoch: 11120/20000, Loss: 0.0000037624786273\n",
      "Epoch: 11130/20000, Loss: 0.0000034243078062\n",
      "Epoch: 11140/20000, Loss: 0.0000033443075154\n",
      "Epoch: 11150/20000, Loss: 0.0000033476540011\n",
      "Epoch: 11160/20000, Loss: 0.0000035822638438\n",
      "Epoch: 11170/20000, Loss: 0.0000091478013928\n",
      "Epoch: 11180/20000, Loss: 0.0000096381263575\n",
      "Epoch: 11190/20000, Loss: 0.0000037908166632\n",
      "Epoch: 11200/20000, Loss: 0.0000041863886509\n",
      "Epoch: 11210/20000, Loss: 0.0000038810430851\n",
      "Epoch: 11220/20000, Loss: 0.0000034831036828\n",
      "Epoch: 11230/20000, Loss: 0.0000033120300031\n",
      "Epoch: 11240/20000, Loss: 0.0000032471969007\n",
      "Epoch: 11250/20000, Loss: 0.0000032147058846\n",
      "Epoch: 11260/20000, Loss: 0.0000036148519484\n",
      "Epoch: 11270/20000, Loss: 0.0000245739174716\n",
      "Epoch: 11280/20000, Loss: 0.0000118081761684\n",
      "Epoch: 11290/20000, Loss: 0.0000061146556618\n",
      "Epoch: 11300/20000, Loss: 0.0000037994450395\n",
      "Epoch: 11310/20000, Loss: 0.0000033914616324\n",
      "Epoch: 11320/20000, Loss: 0.0000032486259443\n",
      "Epoch: 11330/20000, Loss: 0.0000031928059343\n",
      "Epoch: 11340/20000, Loss: 0.0000035002867662\n",
      "Epoch: 11350/20000, Loss: 0.0000101071063909\n",
      "Epoch: 11360/20000, Loss: 0.0000053197059060\n",
      "Epoch: 11370/20000, Loss: 0.0000043524496505\n",
      "Epoch: 11380/20000, Loss: 0.0000041507664719\n",
      "Epoch: 11390/20000, Loss: 0.0000035370471778\n",
      "Epoch: 11400/20000, Loss: 0.0000032332138744\n",
      "Epoch: 11410/20000, Loss: 0.0000031370518627\n",
      "Epoch: 11420/20000, Loss: 0.0000030847920698\n",
      "Epoch: 11430/20000, Loss: 0.0000031213726288\n",
      "Epoch: 11440/20000, Loss: 0.0000046661680244\n",
      "Epoch: 11450/20000, Loss: 0.0000218821660383\n",
      "Epoch: 11460/20000, Loss: 0.0000066975826485\n",
      "Epoch: 11470/20000, Loss: 0.0000044079042709\n",
      "Epoch: 11480/20000, Loss: 0.0000038211096580\n",
      "Epoch: 11490/20000, Loss: 0.0000031485010368\n",
      "Epoch: 11500/20000, Loss: 0.0000030771000183\n",
      "Epoch: 11510/20000, Loss: 0.0000030129938295\n",
      "Epoch: 11520/20000, Loss: 0.0000030037087981\n",
      "Epoch: 11530/20000, Loss: 0.0000033409835396\n",
      "Epoch: 11540/20000, Loss: 0.0000152267484737\n",
      "Epoch: 11550/20000, Loss: 0.0000046772347559\n",
      "Epoch: 11560/20000, Loss: 0.0000065592535066\n",
      "Epoch: 11570/20000, Loss: 0.0000034753538785\n",
      "Epoch: 11580/20000, Loss: 0.0000032807090520\n",
      "Epoch: 11590/20000, Loss: 0.0000031129313811\n",
      "Epoch: 11600/20000, Loss: 0.0000029578661724\n",
      "Epoch: 11610/20000, Loss: 0.0000029083855679\n",
      "Epoch: 11620/20000, Loss: 0.0000029022030503\n",
      "Epoch: 11630/20000, Loss: 0.0000036890312458\n",
      "Epoch: 11640/20000, Loss: 0.0000223627212108\n",
      "Epoch: 11650/20000, Loss: 0.0000052106197472\n",
      "Epoch: 11660/20000, Loss: 0.0000041821490413\n",
      "Epoch: 11670/20000, Loss: 0.0000033464123135\n",
      "Epoch: 11680/20000, Loss: 0.0000029021075534\n",
      "Epoch: 11690/20000, Loss: 0.0000029465275020\n",
      "Epoch: 11700/20000, Loss: 0.0000028490030672\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 11710/20000, Loss: 0.0000030522123780\n",
      "Epoch: 11720/20000, Loss: 0.0000086834388640\n",
      "Epoch: 11730/20000, Loss: 0.0000159576757142\n",
      "Epoch: 11740/20000, Loss: 0.0000080708932728\n",
      "Epoch: 11750/20000, Loss: 0.0000040216627895\n",
      "Epoch: 11760/20000, Loss: 0.0000033479193462\n",
      "Epoch: 11770/20000, Loss: 0.0000028656966151\n",
      "Epoch: 11780/20000, Loss: 0.0000027646119634\n",
      "Epoch: 11790/20000, Loss: 0.0000027789649266\n",
      "Epoch: 11800/20000, Loss: 0.0000027549581318\n",
      "Epoch: 11810/20000, Loss: 0.0000028243541692\n",
      "Epoch: 11820/20000, Loss: 0.0000051459678616\n",
      "Epoch: 11830/20000, Loss: 0.0000124468333524\n",
      "Epoch: 11840/20000, Loss: 0.0000050859835028\n",
      "Epoch: 11850/20000, Loss: 0.0000048544693527\n",
      "Epoch: 11860/20000, Loss: 0.0000031375107028\n",
      "Epoch: 11870/20000, Loss: 0.0000029266748243\n",
      "Epoch: 11880/20000, Loss: 0.0000026969498776\n",
      "Epoch: 11890/20000, Loss: 0.0000026899119803\n",
      "Epoch: 11900/20000, Loss: 0.0000027040441637\n",
      "Epoch: 11910/20000, Loss: 0.0000031380147902\n",
      "Epoch: 11920/20000, Loss: 0.0000168013248185\n",
      "Epoch: 11930/20000, Loss: 0.0000067649907578\n",
      "Epoch: 11940/20000, Loss: 0.0000070003784458\n",
      "Epoch: 11950/20000, Loss: 0.0000032918251236\n",
      "Epoch: 11960/20000, Loss: 0.0000027539811072\n",
      "Epoch: 11970/20000, Loss: 0.0000027065159429\n",
      "Epoch: 11980/20000, Loss: 0.0000026436198368\n",
      "Epoch: 11990/20000, Loss: 0.0000025996050681\n",
      "Epoch: 12000/20000, Loss: 0.0000025821998406\n",
      "Epoch: 12010/20000, Loss: 0.0000025775123049\n",
      "Epoch: 12020/20000, Loss: 0.0000026104576136\n",
      "Epoch: 12030/20000, Loss: 0.0000049837267397\n",
      "Epoch: 12040/20000, Loss: 0.0000063888478508\n",
      "Epoch: 12050/20000, Loss: 0.0000064538371589\n",
      "Epoch: 12060/20000, Loss: 0.0000051026490837\n",
      "Epoch: 12070/20000, Loss: 0.0000029875009204\n",
      "Epoch: 12080/20000, Loss: 0.0000030770725061\n",
      "Epoch: 12090/20000, Loss: 0.0000034545912513\n",
      "Epoch: 12100/20000, Loss: 0.0000069651096055\n",
      "Epoch: 12110/20000, Loss: 0.0000072528382589\n",
      "Epoch: 12120/20000, Loss: 0.0000040829950194\n",
      "Epoch: 12130/20000, Loss: 0.0000025428562367\n",
      "Epoch: 12140/20000, Loss: 0.0000029471464131\n",
      "Epoch: 12150/20000, Loss: 0.0000028761037356\n",
      "Epoch: 12160/20000, Loss: 0.0000034545048493\n",
      "Epoch: 12170/20000, Loss: 0.0000120213098853\n",
      "Epoch: 12180/20000, Loss: 0.0000041478861021\n",
      "Epoch: 12190/20000, Loss: 0.0000033594749311\n",
      "Epoch: 12200/20000, Loss: 0.0000033392047953\n",
      "Epoch: 12210/20000, Loss: 0.0000028368940548\n",
      "Epoch: 12220/20000, Loss: 0.0000025520018880\n",
      "Epoch: 12230/20000, Loss: 0.0000024520668376\n",
      "Epoch: 12240/20000, Loss: 0.0000024274590942\n",
      "Epoch: 12250/20000, Loss: 0.0000028842168831\n",
      "Epoch: 12260/20000, Loss: 0.0000236999203480\n",
      "Epoch: 12270/20000, Loss: 0.0000142339822560\n",
      "Epoch: 12280/20000, Loss: 0.0000077341246651\n",
      "Epoch: 12290/20000, Loss: 0.0000037676970805\n",
      "Epoch: 12300/20000, Loss: 0.0000029768341392\n",
      "Epoch: 12310/20000, Loss: 0.0000025518886559\n",
      "Epoch: 12320/20000, Loss: 0.0000024081148240\n",
      "Epoch: 12330/20000, Loss: 0.0000023779953153\n",
      "Epoch: 12340/20000, Loss: 0.0000023587413125\n",
      "Epoch: 12350/20000, Loss: 0.0000023428958684\n",
      "Epoch: 12360/20000, Loss: 0.0000023334750949\n",
      "Epoch: 12370/20000, Loss: 0.0000023252559913\n",
      "Epoch: 12380/20000, Loss: 0.0000023180207336\n",
      "Epoch: 12390/20000, Loss: 0.0000023317188607\n",
      "Epoch: 12400/20000, Loss: 0.0000037766619698\n",
      "Epoch: 12410/20000, Loss: 0.0000337086567015\n",
      "Epoch: 12420/20000, Loss: 0.0000032134209960\n",
      "Epoch: 12430/20000, Loss: 0.0000039211136027\n",
      "Epoch: 12440/20000, Loss: 0.0000032658167584\n",
      "Epoch: 12450/20000, Loss: 0.0000024544322059\n",
      "Epoch: 12460/20000, Loss: 0.0000023747786599\n",
      "Epoch: 12470/20000, Loss: 0.0000022905337573\n",
      "Epoch: 12480/20000, Loss: 0.0000022761641958\n",
      "Epoch: 12490/20000, Loss: 0.0000022624788016\n",
      "Epoch: 12500/20000, Loss: 0.0000023892141598\n",
      "Epoch: 12510/20000, Loss: 0.0000090656340035\n",
      "Epoch: 12520/20000, Loss: 0.0000051419092415\n",
      "Epoch: 12530/20000, Loss: 0.0000033013639040\n",
      "Epoch: 12540/20000, Loss: 0.0000027703260912\n",
      "Epoch: 12550/20000, Loss: 0.0000025673589334\n",
      "Epoch: 12560/20000, Loss: 0.0000023228362807\n",
      "Epoch: 12570/20000, Loss: 0.0000022392011942\n",
      "Epoch: 12580/20000, Loss: 0.0000022013607577\n",
      "Epoch: 12590/20000, Loss: 0.0000022097408419\n",
      "Epoch: 12600/20000, Loss: 0.0000025156095944\n",
      "Epoch: 12610/20000, Loss: 0.0000198763682420\n",
      "Epoch: 12620/20000, Loss: 0.0000107682371890\n",
      "Epoch: 12630/20000, Loss: 0.0000049877544370\n",
      "Epoch: 12640/20000, Loss: 0.0000024810060495\n",
      "Epoch: 12650/20000, Loss: 0.0000023940428946\n",
      "Epoch: 12660/20000, Loss: 0.0000023293991944\n",
      "Epoch: 12670/20000, Loss: 0.0000022486528906\n",
      "Epoch: 12680/20000, Loss: 0.0000024041364668\n",
      "Epoch: 12690/20000, Loss: 0.0000054273582464\n",
      "Epoch: 12700/20000, Loss: 0.0000136067346830\n",
      "Epoch: 12710/20000, Loss: 0.0000055194368542\n",
      "Epoch: 12720/20000, Loss: 0.0000032089706110\n",
      "Epoch: 12730/20000, Loss: 0.0000025914898742\n",
      "Epoch: 12740/20000, Loss: 0.0000023384322958\n",
      "Epoch: 12750/20000, Loss: 0.0000021464418296\n",
      "Epoch: 12760/20000, Loss: 0.0000021207588361\n",
      "Epoch: 12770/20000, Loss: 0.0000020961028895\n",
      "Epoch: 12780/20000, Loss: 0.0000021157934498\n",
      "Epoch: 12790/20000, Loss: 0.0000025211650154\n",
      "Epoch: 12800/20000, Loss: 0.0000154041335918\n",
      "Epoch: 12810/20000, Loss: 0.0000051409442676\n",
      "Epoch: 12820/20000, Loss: 0.0000059207272898\n",
      "Epoch: 12830/20000, Loss: 0.0000023878160391\n",
      "Epoch: 12840/20000, Loss: 0.0000024020055207\n",
      "Epoch: 12850/20000, Loss: 0.0000022598821943\n",
      "Epoch: 12860/20000, Loss: 0.0000020984298317\n",
      "Epoch: 12870/20000, Loss: 0.0000020542508992\n",
      "Epoch: 12880/20000, Loss: 0.0000020420213787\n",
      "Epoch: 12890/20000, Loss: 0.0000020583433979\n",
      "Epoch: 12900/20000, Loss: 0.0000036467667996\n",
      "Epoch: 12910/20000, Loss: 0.0000142694771057\n",
      "Epoch: 12920/20000, Loss: 0.0000061199712036\n",
      "Epoch: 12930/20000, Loss: 0.0000028181930247\n",
      "Epoch: 12940/20000, Loss: 0.0000023542970666\n",
      "Epoch: 12950/20000, Loss: 0.0000022141780391\n",
      "Epoch: 12960/20000, Loss: 0.0000020593140562\n",
      "Epoch: 12970/20000, Loss: 0.0000021063476652\n",
      "Epoch: 12980/20000, Loss: 0.0000039681240196\n",
      "Epoch: 12990/20000, Loss: 0.0000113592277557\n",
      "Epoch: 13000/20000, Loss: 0.0000049270911404\n",
      "Epoch: 13010/20000, Loss: 0.0000027670887448\n",
      "Epoch: 13020/20000, Loss: 0.0000023918626084\n",
      "Epoch: 13030/20000, Loss: 0.0000021864950668\n",
      "Epoch: 13040/20000, Loss: 0.0000021899311378\n",
      "Epoch: 13050/20000, Loss: 0.0000044993562369\n",
      "Epoch: 13060/20000, Loss: 0.0000194364765775\n",
      "Epoch: 13070/20000, Loss: 0.0000059763883655\n",
      "Epoch: 13080/20000, Loss: 0.0000024620312615\n",
      "Epoch: 13090/20000, Loss: 0.0000020121387934\n",
      "Epoch: 13100/20000, Loss: 0.0000019631158921\n",
      "Epoch: 13110/20000, Loss: 0.0000019373571831\n",
      "Epoch: 13120/20000, Loss: 0.0000019295659968\n",
      "Epoch: 13130/20000, Loss: 0.0000019362673811\n",
      "Epoch: 13140/20000, Loss: 0.0000019340977815\n",
      "Epoch: 13150/20000, Loss: 0.0000023658010377\n",
      "Epoch: 13160/20000, Loss: 0.0000131237648020\n",
      "Epoch: 13170/20000, Loss: 0.0000072449292929\n",
      "Epoch: 13180/20000, Loss: 0.0000027248922834\n",
      "Epoch: 13190/20000, Loss: 0.0000025685678793\n",
      "Epoch: 13200/20000, Loss: 0.0000023189381864\n",
      "Epoch: 13210/20000, Loss: 0.0000019769290702\n",
      "Epoch: 13220/20000, Loss: 0.0000018874670786\n",
      "Epoch: 13230/20000, Loss: 0.0000018902679813\n",
      "Epoch: 13240/20000, Loss: 0.0000019028185534\n",
      "Epoch: 13250/20000, Loss: 0.0000023222678465\n",
      "Epoch: 13260/20000, Loss: 0.0000133573703351\n",
      "Epoch: 13270/20000, Loss: 0.0000044172215894\n",
      "Epoch: 13280/20000, Loss: 0.0000049034083531\n",
      "Epoch: 13290/20000, Loss: 0.0000029893442388\n",
      "Epoch: 13300/20000, Loss: 0.0000020929599032\n",
      "Epoch: 13310/20000, Loss: 0.0000019088111003\n",
      "Epoch: 13320/20000, Loss: 0.0000020089162263\n",
      "Epoch: 13330/20000, Loss: 0.0000058132627601\n",
      "Epoch: 13340/20000, Loss: 0.0000069116172199\n",
      "Epoch: 13350/20000, Loss: 0.0000037750739921\n",
      "Epoch: 13360/20000, Loss: 0.0000029362004170\n",
      "Epoch: 13370/20000, Loss: 0.0000021187913717\n",
      "Epoch: 13380/20000, Loss: 0.0000018877409502\n",
      "Epoch: 13390/20000, Loss: 0.0000018436160190\n",
      "Epoch: 13400/20000, Loss: 0.0000018878350829\n",
      "Epoch: 13410/20000, Loss: 0.0000027726478038\n",
      "Epoch: 13420/20000, Loss: 0.0000152341999637\n",
      "Epoch: 13430/20000, Loss: 0.0000061181035562\n",
      "Epoch: 13440/20000, Loss: 0.0000029014302072\n",
      "Epoch: 13450/20000, Loss: 0.0000019270244138\n",
      "Epoch: 13460/20000, Loss: 0.0000019806311684\n",
      "Epoch: 13470/20000, Loss: 0.0000019598217023\n",
      "Epoch: 13480/20000, Loss: 0.0000027567884899\n",
      "Epoch: 13490/20000, Loss: 0.0000140723650475\n",
      "Epoch: 13500/20000, Loss: 0.0000043212330638\n",
      "Epoch: 13510/20000, Loss: 0.0000031187273635\n",
      "Epoch: 13520/20000, Loss: 0.0000023059233172\n",
      "Epoch: 13530/20000, Loss: 0.0000019327728751\n",
      "Epoch: 13540/20000, Loss: 0.0000019026269911\n",
      "Epoch: 13550/20000, Loss: 0.0000043392055886\n",
      "Epoch: 13560/20000, Loss: 0.0000090370513135\n",
      "Epoch: 13570/20000, Loss: 0.0000030640826481\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 13580/20000, Loss: 0.0000021742966965\n",
      "Epoch: 13590/20000, Loss: 0.0000021190539883\n",
      "Epoch: 13600/20000, Loss: 0.0000018528093051\n",
      "Epoch: 13610/20000, Loss: 0.0000018755735027\n",
      "Epoch: 13620/20000, Loss: 0.0000021867772375\n",
      "Epoch: 13630/20000, Loss: 0.0000068721524258\n",
      "Epoch: 13640/20000, Loss: 0.0000066227439675\n",
      "Epoch: 13650/20000, Loss: 0.0000032713080600\n",
      "Epoch: 13660/20000, Loss: 0.0000021712201033\n",
      "Epoch: 13670/20000, Loss: 0.0000019385768155\n",
      "Epoch: 13680/20000, Loss: 0.0000018366406493\n",
      "Epoch: 13690/20000, Loss: 0.0000021822122562\n",
      "Epoch: 13700/20000, Loss: 0.0000076987062130\n",
      "Epoch: 13710/20000, Loss: 0.0000036288420233\n",
      "Epoch: 13720/20000, Loss: 0.0000055760733630\n",
      "Epoch: 13730/20000, Loss: 0.0000067507662607\n",
      "Epoch: 13740/20000, Loss: 0.0000031478834899\n",
      "Epoch: 13750/20000, Loss: 0.0000020150205273\n",
      "Epoch: 13760/20000, Loss: 0.0000017619672690\n",
      "Epoch: 13770/20000, Loss: 0.0000017757744217\n",
      "Epoch: 13780/20000, Loss: 0.0000020079994556\n",
      "Epoch: 13790/20000, Loss: 0.0000043863383326\n",
      "Epoch: 13800/20000, Loss: 0.0000072175089372\n",
      "Epoch: 13810/20000, Loss: 0.0000047597027333\n",
      "Epoch: 13820/20000, Loss: 0.0000028067902349\n",
      "Epoch: 13830/20000, Loss: 0.0000027398234579\n",
      "Epoch: 13840/20000, Loss: 0.0000020342804419\n",
      "Epoch: 13850/20000, Loss: 0.0000017365023268\n",
      "Epoch: 13860/20000, Loss: 0.0000016480723843\n",
      "Epoch: 13870/20000, Loss: 0.0000016538932641\n",
      "Epoch: 13880/20000, Loss: 0.0000017055067474\n",
      "Epoch: 13890/20000, Loss: 0.0000035258285607\n",
      "Epoch: 13900/20000, Loss: 0.0000109520624392\n",
      "Epoch: 13910/20000, Loss: 0.0000028644933536\n",
      "Epoch: 13920/20000, Loss: 0.0000029277205158\n",
      "Epoch: 13930/20000, Loss: 0.0000022661404273\n",
      "Epoch: 13940/20000, Loss: 0.0000016771642777\n",
      "Epoch: 13950/20000, Loss: 0.0000017545401079\n",
      "Epoch: 13960/20000, Loss: 0.0000029110983633\n",
      "Epoch: 13970/20000, Loss: 0.0000075706871030\n",
      "Epoch: 13980/20000, Loss: 0.0000051837978390\n",
      "Epoch: 13990/20000, Loss: 0.0000022465280836\n",
      "Epoch: 14000/20000, Loss: 0.0000023826748929\n",
      "Epoch: 14010/20000, Loss: 0.0000019710419110\n",
      "Epoch: 14020/20000, Loss: 0.0000027421651794\n",
      "Epoch: 14030/20000, Loss: 0.0000074881031651\n",
      "Epoch: 14040/20000, Loss: 0.0000085187630248\n",
      "Epoch: 14050/20000, Loss: 0.0000045270126066\n",
      "Epoch: 14060/20000, Loss: 0.0000031347960885\n",
      "Epoch: 14070/20000, Loss: 0.0000020860945824\n",
      "Epoch: 14080/20000, Loss: 0.0000016760100152\n",
      "Epoch: 14090/20000, Loss: 0.0000016896827901\n",
      "Epoch: 14100/20000, Loss: 0.0000017409904558\n",
      "Epoch: 14110/20000, Loss: 0.0000024808825856\n",
      "Epoch: 14120/20000, Loss: 0.0000120612394312\n",
      "Epoch: 14130/20000, Loss: 0.0000022049773634\n",
      "Epoch: 14140/20000, Loss: 0.0000019889544092\n",
      "Epoch: 14150/20000, Loss: 0.0000016616534140\n",
      "Epoch: 14160/20000, Loss: 0.0000016165155330\n",
      "Epoch: 14170/20000, Loss: 0.0000017054488808\n",
      "Epoch: 14180/20000, Loss: 0.0000018907300046\n",
      "Epoch: 14190/20000, Loss: 0.0000058115747379\n",
      "Epoch: 14200/20000, Loss: 0.0000027509547635\n",
      "Epoch: 14210/20000, Loss: 0.0000021765097244\n",
      "Epoch: 14220/20000, Loss: 0.0000049896711971\n",
      "Epoch: 14230/20000, Loss: 0.0000076568130680\n",
      "Epoch: 14240/20000, Loss: 0.0000031113070236\n",
      "Epoch: 14250/20000, Loss: 0.0000018042975398\n",
      "Epoch: 14260/20000, Loss: 0.0000019313827124\n",
      "Epoch: 14270/20000, Loss: 0.0000016156460561\n",
      "Epoch: 14280/20000, Loss: 0.0000016384556147\n",
      "Epoch: 14290/20000, Loss: 0.0000026296247597\n",
      "Epoch: 14300/20000, Loss: 0.0000080337713371\n",
      "Epoch: 14310/20000, Loss: 0.0000068870963332\n",
      "Epoch: 14320/20000, Loss: 0.0000056919443523\n",
      "Epoch: 14330/20000, Loss: 0.0000054594343055\n",
      "Epoch: 14340/20000, Loss: 0.0000025264780561\n",
      "Epoch: 14350/20000, Loss: 0.0000017340041722\n",
      "Epoch: 14360/20000, Loss: 0.0000017960276182\n",
      "Epoch: 14370/20000, Loss: 0.0000016490931785\n",
      "Epoch: 14380/20000, Loss: 0.0000016858391518\n",
      "Epoch: 14390/20000, Loss: 0.0000035006514736\n",
      "Epoch: 14400/20000, Loss: 0.0000167034067999\n",
      "Epoch: 14410/20000, Loss: 0.0000056883095567\n",
      "Epoch: 14420/20000, Loss: 0.0000028414474400\n",
      "Epoch: 14430/20000, Loss: 0.0000018830992303\n",
      "Epoch: 14440/20000, Loss: 0.0000016379124190\n",
      "Epoch: 14450/20000, Loss: 0.0000015648960243\n",
      "Epoch: 14460/20000, Loss: 0.0000016891272026\n",
      "Epoch: 14470/20000, Loss: 0.0000046760264922\n",
      "Epoch: 14480/20000, Loss: 0.0000041416474232\n",
      "Epoch: 14490/20000, Loss: 0.0000019576657451\n",
      "Epoch: 14500/20000, Loss: 0.0000018392931906\n",
      "Epoch: 14510/20000, Loss: 0.0000019632852855\n",
      "Epoch: 14520/20000, Loss: 0.0000037806082673\n",
      "Epoch: 14530/20000, Loss: 0.0000113690757644\n",
      "Epoch: 14540/20000, Loss: 0.0000041215275814\n",
      "Epoch: 14550/20000, Loss: 0.0000022071942567\n",
      "Epoch: 14560/20000, Loss: 0.0000016116379129\n",
      "Epoch: 14570/20000, Loss: 0.0000015916809843\n",
      "Epoch: 14580/20000, Loss: 0.0000014912848201\n",
      "Epoch: 14590/20000, Loss: 0.0000015187133613\n",
      "Epoch: 14600/20000, Loss: 0.0000023797597350\n",
      "Epoch: 14610/20000, Loss: 0.0000221786049224\n",
      "Epoch: 14620/20000, Loss: 0.0000036670783174\n",
      "Epoch: 14630/20000, Loss: 0.0000026816142054\n",
      "Epoch: 14640/20000, Loss: 0.0000022479712243\n",
      "Epoch: 14650/20000, Loss: 0.0000017077702523\n",
      "Epoch: 14660/20000, Loss: 0.0000016217164784\n",
      "Epoch: 14670/20000, Loss: 0.0000033594105844\n",
      "Epoch: 14680/20000, Loss: 0.0000128118454086\n",
      "Epoch: 14690/20000, Loss: 0.0000048091692406\n",
      "Epoch: 14700/20000, Loss: 0.0000025102403924\n",
      "Epoch: 14710/20000, Loss: 0.0000018759361637\n",
      "Epoch: 14720/20000, Loss: 0.0000015942658820\n",
      "Epoch: 14730/20000, Loss: 0.0000014401247199\n",
      "Epoch: 14740/20000, Loss: 0.0000014464775404\n",
      "Epoch: 14750/20000, Loss: 0.0000015141021095\n",
      "Epoch: 14760/20000, Loss: 0.0000039504602682\n",
      "Epoch: 14770/20000, Loss: 0.0000042407987166\n",
      "Epoch: 14780/20000, Loss: 0.0000055887417147\n",
      "Epoch: 14790/20000, Loss: 0.0000019886624614\n",
      "Epoch: 14800/20000, Loss: 0.0000022306790015\n",
      "Epoch: 14810/20000, Loss: 0.0000015555949631\n",
      "Epoch: 14820/20000, Loss: 0.0000014520437617\n",
      "Epoch: 14830/20000, Loss: 0.0000016946338519\n",
      "Epoch: 14840/20000, Loss: 0.0000080512027125\n",
      "Epoch: 14850/20000, Loss: 0.0000031965676044\n",
      "Epoch: 14860/20000, Loss: 0.0000022453289148\n",
      "Epoch: 14870/20000, Loss: 0.0000024454982395\n",
      "Epoch: 14880/20000, Loss: 0.0000018382318103\n",
      "Epoch: 14890/20000, Loss: 0.0000017591230517\n",
      "Epoch: 14900/20000, Loss: 0.0000057440606724\n",
      "Epoch: 14910/20000, Loss: 0.0000022538838493\n",
      "Epoch: 14920/20000, Loss: 0.0000021529124297\n",
      "Epoch: 14930/20000, Loss: 0.0000016665786688\n",
      "Epoch: 14940/20000, Loss: 0.0000015483909692\n",
      "Epoch: 14950/20000, Loss: 0.0000015207064052\n",
      "Epoch: 14960/20000, Loss: 0.0000022193323730\n",
      "Epoch: 14970/20000, Loss: 0.0000112233110485\n",
      "Epoch: 14980/20000, Loss: 0.0000032256987197\n",
      "Epoch: 14990/20000, Loss: 0.0000025953804652\n",
      "Epoch: 15000/20000, Loss: 0.0000020204147404\n",
      "Epoch: 15010/20000, Loss: 0.0000016584948526\n",
      "Epoch: 15020/20000, Loss: 0.0000013915497448\n",
      "Epoch: 15030/20000, Loss: 0.0000013873685702\n",
      "Epoch: 15040/20000, Loss: 0.0000014358516864\n",
      "Epoch: 15050/20000, Loss: 0.0000033075077681\n",
      "Epoch: 15060/20000, Loss: 0.0000152429392983\n",
      "Epoch: 15070/20000, Loss: 0.0000103540069176\n",
      "Epoch: 15080/20000, Loss: 0.0000035178018152\n",
      "Epoch: 15090/20000, Loss: 0.0000020954216780\n",
      "Epoch: 15100/20000, Loss: 0.0000014777028809\n",
      "Epoch: 15110/20000, Loss: 0.0000013641190435\n",
      "Epoch: 15120/20000, Loss: 0.0000013461258277\n",
      "Epoch: 15130/20000, Loss: 0.0000013532253433\n",
      "Epoch: 15140/20000, Loss: 0.0000014582434460\n",
      "Epoch: 15150/20000, Loss: 0.0000046313489293\n",
      "Epoch: 15160/20000, Loss: 0.0000113952410175\n",
      "Epoch: 15170/20000, Loss: 0.0000017028698949\n",
      "Epoch: 15180/20000, Loss: 0.0000018105314439\n",
      "Epoch: 15190/20000, Loss: 0.0000018897521841\n",
      "Epoch: 15200/20000, Loss: 0.0000015504997464\n",
      "Epoch: 15210/20000, Loss: 0.0000013973863133\n",
      "Epoch: 15220/20000, Loss: 0.0000013704575395\n",
      "Epoch: 15230/20000, Loss: 0.0000020792583655\n",
      "Epoch: 15240/20000, Loss: 0.0000073058599810\n",
      "Epoch: 15250/20000, Loss: 0.0000022457622890\n",
      "Epoch: 15260/20000, Loss: 0.0000015306934529\n",
      "Epoch: 15270/20000, Loss: 0.0000014266585140\n",
      "Epoch: 15280/20000, Loss: 0.0000014407299886\n",
      "Epoch: 15290/20000, Loss: 0.0000025704866857\n",
      "Epoch: 15300/20000, Loss: 0.0000149708512254\n",
      "Epoch: 15310/20000, Loss: 0.0000054462661865\n",
      "Epoch: 15320/20000, Loss: 0.0000028859860777\n",
      "Epoch: 15330/20000, Loss: 0.0000019257793156\n",
      "Epoch: 15340/20000, Loss: 0.0000015664038528\n",
      "Epoch: 15350/20000, Loss: 0.0000017098057015\n",
      "Epoch: 15360/20000, Loss: 0.0000058077753238\n",
      "Epoch: 15370/20000, Loss: 0.0000021254088551\n",
      "Epoch: 15380/20000, Loss: 0.0000016230932260\n",
      "Epoch: 15390/20000, Loss: 0.0000016081303329\n",
      "Epoch: 15400/20000, Loss: 0.0000015025946141\n",
      "Epoch: 15410/20000, Loss: 0.0000024584835501\n",
      "Epoch: 15420/20000, Loss: 0.0000114337408377\n",
      "Epoch: 15430/20000, Loss: 0.0000026144239200\n",
      "Epoch: 15440/20000, Loss: 0.0000019836782030\n",
      "Epoch: 15450/20000, Loss: 0.0000015354888774\n",
      "Epoch: 15460/20000, Loss: 0.0000014507010064\n",
      "Epoch: 15470/20000, Loss: 0.0000016664220084\n",
      "Epoch: 15480/20000, Loss: 0.0000048664733185\n",
      "Epoch: 15490/20000, Loss: 0.0000032199116049\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 15500/20000, Loss: 0.0000021616774575\n",
      "Epoch: 15510/20000, Loss: 0.0000017866965436\n",
      "Epoch: 15520/20000, Loss: 0.0000029886950870\n",
      "Epoch: 15530/20000, Loss: 0.0000066526476985\n",
      "Epoch: 15540/20000, Loss: 0.0000044933217396\n",
      "Epoch: 15550/20000, Loss: 0.0000014872787233\n",
      "Epoch: 15560/20000, Loss: 0.0000016217352368\n",
      "Epoch: 15570/20000, Loss: 0.0000014124183281\n",
      "Epoch: 15580/20000, Loss: 0.0000013050998859\n",
      "Epoch: 15590/20000, Loss: 0.0000015776779492\n",
      "Epoch: 15600/20000, Loss: 0.0000094586039268\n",
      "Epoch: 15610/20000, Loss: 0.0000059379776758\n",
      "Epoch: 15620/20000, Loss: 0.0000057660422499\n",
      "Epoch: 15630/20000, Loss: 0.0000019464951038\n",
      "Epoch: 15640/20000, Loss: 0.0000013979439473\n",
      "Epoch: 15650/20000, Loss: 0.0000014462442550\n",
      "Epoch: 15660/20000, Loss: 0.0000012443223341\n",
      "Epoch: 15670/20000, Loss: 0.0000011954091406\n",
      "Epoch: 15680/20000, Loss: 0.0000011895031093\n",
      "Epoch: 15690/20000, Loss: 0.0000012003669099\n",
      "Epoch: 15700/20000, Loss: 0.0000018136794324\n",
      "Epoch: 15710/20000, Loss: 0.0000085642113845\n",
      "Epoch: 15720/20000, Loss: 0.0000050101502893\n",
      "Epoch: 15730/20000, Loss: 0.0000022989474928\n",
      "Epoch: 15740/20000, Loss: 0.0000023023692393\n",
      "Epoch: 15750/20000, Loss: 0.0000020749432679\n",
      "Epoch: 15760/20000, Loss: 0.0000035159155232\n",
      "Epoch: 15770/20000, Loss: 0.0000066986790443\n",
      "Epoch: 15780/20000, Loss: 0.0000015599276821\n",
      "Epoch: 15790/20000, Loss: 0.0000016039933826\n",
      "Epoch: 15800/20000, Loss: 0.0000016060841972\n",
      "Epoch: 15810/20000, Loss: 0.0000039078636291\n",
      "Epoch: 15820/20000, Loss: 0.0000036858778003\n",
      "Epoch: 15830/20000, Loss: 0.0000031887327623\n",
      "Epoch: 15840/20000, Loss: 0.0000028132756142\n",
      "Epoch: 15850/20000, Loss: 0.0000031979889172\n",
      "Epoch: 15860/20000, Loss: 0.0000030211417652\n",
      "Epoch: 15870/20000, Loss: 0.0000016631151993\n",
      "Epoch: 15880/20000, Loss: 0.0000023702450562\n",
      "Epoch: 15890/20000, Loss: 0.0000026685272587\n",
      "Epoch: 15900/20000, Loss: 0.0000063466518441\n",
      "Epoch: 15910/20000, Loss: 0.0000049116306400\n",
      "Epoch: 15920/20000, Loss: 0.0000026740076464\n",
      "Epoch: 15930/20000, Loss: 0.0000017646204924\n",
      "Epoch: 15940/20000, Loss: 0.0000014505598074\n",
      "Epoch: 15950/20000, Loss: 0.0000011815044445\n",
      "Epoch: 15960/20000, Loss: 0.0000013536895267\n",
      "Epoch: 15970/20000, Loss: 0.0000044285930016\n",
      "Epoch: 15980/20000, Loss: 0.0000082947717601\n",
      "Epoch: 15990/20000, Loss: 0.0000033739083847\n",
      "Epoch: 16000/20000, Loss: 0.0000021416408345\n",
      "Epoch: 16010/20000, Loss: 0.0000014804319335\n",
      "Epoch: 16020/20000, Loss: 0.0000013662219089\n",
      "Epoch: 16030/20000, Loss: 0.0000020424149625\n",
      "Epoch: 16040/20000, Loss: 0.0000053962244237\n",
      "Epoch: 16050/20000, Loss: 0.0000025873403047\n",
      "Epoch: 16060/20000, Loss: 0.0000012694392808\n",
      "Epoch: 16070/20000, Loss: 0.0000018828962993\n",
      "Epoch: 16080/20000, Loss: 0.0000037823040202\n",
      "Epoch: 16090/20000, Loss: 0.0000021980411020\n",
      "Epoch: 16100/20000, Loss: 0.0000072054895099\n",
      "Epoch: 16110/20000, Loss: 0.0000031633803701\n",
      "Epoch: 16120/20000, Loss: 0.0000019127876385\n",
      "Epoch: 16130/20000, Loss: 0.0000014093856180\n",
      "Epoch: 16140/20000, Loss: 0.0000013082719761\n",
      "Epoch: 16150/20000, Loss: 0.0000011698670050\n",
      "Epoch: 16160/20000, Loss: 0.0000014315015733\n",
      "Epoch: 16170/20000, Loss: 0.0000058656487454\n",
      "Epoch: 16180/20000, Loss: 0.0000083995173554\n",
      "Epoch: 16190/20000, Loss: 0.0000037857923871\n",
      "Epoch: 16200/20000, Loss: 0.0000021032485620\n",
      "Epoch: 16210/20000, Loss: 0.0000013258475065\n",
      "Epoch: 16220/20000, Loss: 0.0000011339110415\n",
      "Epoch: 16230/20000, Loss: 0.0000010773052281\n",
      "Epoch: 16240/20000, Loss: 0.0000011022970057\n",
      "Epoch: 16250/20000, Loss: 0.0000025068300147\n",
      "Epoch: 16260/20000, Loss: 0.0000100769966593\n",
      "Epoch: 16270/20000, Loss: 0.0000020031238819\n",
      "Epoch: 16280/20000, Loss: 0.0000023036084258\n",
      "Epoch: 16290/20000, Loss: 0.0000012453967884\n",
      "Epoch: 16300/20000, Loss: 0.0000012152473801\n",
      "Epoch: 16310/20000, Loss: 0.0000011156020037\n",
      "Epoch: 16320/20000, Loss: 0.0000021392058898\n",
      "Epoch: 16330/20000, Loss: 0.0000099567114376\n",
      "Epoch: 16340/20000, Loss: 0.0000030280905321\n",
      "Epoch: 16350/20000, Loss: 0.0000019099168185\n",
      "Epoch: 16360/20000, Loss: 0.0000011812915091\n",
      "Epoch: 16370/20000, Loss: 0.0000011279589671\n",
      "Epoch: 16380/20000, Loss: 0.0000012870148112\n",
      "Epoch: 16390/20000, Loss: 0.0000031720735478\n",
      "Epoch: 16400/20000, Loss: 0.0000093542676041\n",
      "Epoch: 16410/20000, Loss: 0.0000041899443204\n",
      "Epoch: 16420/20000, Loss: 0.0000020128245524\n",
      "Epoch: 16430/20000, Loss: 0.0000014192478375\n",
      "Epoch: 16440/20000, Loss: 0.0000011534798432\n",
      "Epoch: 16450/20000, Loss: 0.0000010349760942\n",
      "Epoch: 16460/20000, Loss: 0.0000012491593679\n",
      "Epoch: 16470/20000, Loss: 0.0000106230008896\n",
      "Epoch: 16480/20000, Loss: 0.0000039608553379\n",
      "Epoch: 16490/20000, Loss: 0.0000026892864753\n",
      "Epoch: 16500/20000, Loss: 0.0000015416014776\n",
      "Epoch: 16510/20000, Loss: 0.0000013129313174\n",
      "Epoch: 16520/20000, Loss: 0.0000010149046830\n",
      "Epoch: 16530/20000, Loss: 0.0000012914426861\n",
      "Epoch: 16540/20000, Loss: 0.0000088181168394\n",
      "Epoch: 16550/20000, Loss: 0.0000031455515455\n",
      "Epoch: 16560/20000, Loss: 0.0000020604481961\n",
      "Epoch: 16570/20000, Loss: 0.0000013628327906\n",
      "Epoch: 16580/20000, Loss: 0.0000010935839327\n",
      "Epoch: 16590/20000, Loss: 0.0000009777998002\n",
      "Epoch: 16600/20000, Loss: 0.0000009804098227\n",
      "Epoch: 16610/20000, Loss: 0.0000013940968984\n",
      "Epoch: 16620/20000, Loss: 0.0000085163801486\n",
      "Epoch: 16630/20000, Loss: 0.0000081098633018\n",
      "Epoch: 16640/20000, Loss: 0.0000032934785850\n",
      "Epoch: 16650/20000, Loss: 0.0000012266034446\n",
      "Epoch: 16660/20000, Loss: 0.0000010525644711\n",
      "Epoch: 16670/20000, Loss: 0.0000010424195125\n",
      "Epoch: 16680/20000, Loss: 0.0000009351231256\n",
      "Epoch: 16690/20000, Loss: 0.0000009132351124\n",
      "Epoch: 16700/20000, Loss: 0.0000009392258562\n",
      "Epoch: 16710/20000, Loss: 0.0000022429035198\n",
      "Epoch: 16720/20000, Loss: 0.0000280447729892\n",
      "Epoch: 16730/20000, Loss: 0.0000039615197238\n",
      "Epoch: 16740/20000, Loss: 0.0000029808302315\n",
      "Epoch: 16750/20000, Loss: 0.0000012989052038\n",
      "Epoch: 16760/20000, Loss: 0.0000011599810250\n",
      "Epoch: 16770/20000, Loss: 0.0000009940926020\n",
      "Epoch: 16780/20000, Loss: 0.0000008841406611\n",
      "Epoch: 16790/20000, Loss: 0.0000008841832368\n",
      "Epoch: 16800/20000, Loss: 0.0000008767478334\n",
      "Epoch: 16810/20000, Loss: 0.0000008992761309\n",
      "Epoch: 16820/20000, Loss: 0.0000018112183398\n",
      "Epoch: 16830/20000, Loss: 0.0000100492416095\n",
      "Epoch: 16840/20000, Loss: 0.0000027259652597\n",
      "Epoch: 16850/20000, Loss: 0.0000014830671944\n",
      "Epoch: 16860/20000, Loss: 0.0000012307813222\n",
      "Epoch: 16870/20000, Loss: 0.0000009447497291\n",
      "Epoch: 16880/20000, Loss: 0.0000009232589946\n",
      "Epoch: 16890/20000, Loss: 0.0000028165029562\n",
      "Epoch: 16900/20000, Loss: 0.0000132094273795\n",
      "Epoch: 16910/20000, Loss: 0.0000031848167055\n",
      "Epoch: 16920/20000, Loss: 0.0000014650911453\n",
      "Epoch: 16930/20000, Loss: 0.0000009956326039\n",
      "Epoch: 16940/20000, Loss: 0.0000010222989886\n",
      "Epoch: 16950/20000, Loss: 0.0000008788348396\n",
      "Epoch: 16960/20000, Loss: 0.0000009577141782\n",
      "Epoch: 16970/20000, Loss: 0.0000048413189688\n",
      "Epoch: 16980/20000, Loss: 0.0000043025966079\n",
      "Epoch: 16990/20000, Loss: 0.0000020264599243\n",
      "Epoch: 17000/20000, Loss: 0.0000014759855276\n",
      "Epoch: 17010/20000, Loss: 0.0000010194235074\n",
      "Epoch: 17020/20000, Loss: 0.0000009111939789\n",
      "Epoch: 17030/20000, Loss: 0.0000008460908134\n",
      "Epoch: 17040/20000, Loss: 0.0000022130589059\n",
      "Epoch: 17050/20000, Loss: 0.0000122354049381\n",
      "Epoch: 17060/20000, Loss: 0.0000041741104724\n",
      "Epoch: 17070/20000, Loss: 0.0000013188468984\n",
      "Epoch: 17080/20000, Loss: 0.0000013419919469\n",
      "Epoch: 17090/20000, Loss: 0.0000009090471735\n",
      "Epoch: 17100/20000, Loss: 0.0000008262925348\n",
      "Epoch: 17110/20000, Loss: 0.0000008088406958\n",
      "Epoch: 17120/20000, Loss: 0.0000008727193404\n",
      "Epoch: 17130/20000, Loss: 0.0000032015591387\n",
      "Epoch: 17140/20000, Loss: 0.0000145778622027\n",
      "Epoch: 17150/20000, Loss: 0.0000025766994440\n",
      "Epoch: 17160/20000, Loss: 0.0000019412443635\n",
      "Epoch: 17170/20000, Loss: 0.0000013513621298\n",
      "Epoch: 17180/20000, Loss: 0.0000009049414302\n",
      "Epoch: 17190/20000, Loss: 0.0000007845347341\n",
      "Epoch: 17200/20000, Loss: 0.0000007630011964\n",
      "Epoch: 17210/20000, Loss: 0.0000007463295901\n",
      "Epoch: 17220/20000, Loss: 0.0000007470236483\n",
      "Epoch: 17230/20000, Loss: 0.0000007997119269\n",
      "Epoch: 17240/20000, Loss: 0.0000031972299439\n",
      "Epoch: 17250/20000, Loss: 0.0000136300368467\n",
      "Epoch: 17260/20000, Loss: 0.0000034613749449\n",
      "Epoch: 17270/20000, Loss: 0.0000012601867638\n",
      "Epoch: 17280/20000, Loss: 0.0000012276072994\n",
      "Epoch: 17290/20000, Loss: 0.0000008555550721\n",
      "Epoch: 17300/20000, Loss: 0.0000007862114444\n",
      "Epoch: 17310/20000, Loss: 0.0000007512308571\n",
      "Epoch: 17320/20000, Loss: 0.0000007268034210\n",
      "Epoch: 17330/20000, Loss: 0.0000007897422165\n",
      "Epoch: 17340/20000, Loss: 0.0000041238472477\n",
      "Epoch: 17350/20000, Loss: 0.0000057585471041\n",
      "Epoch: 17360/20000, Loss: 0.0000052804894040\n",
      "Epoch: 17370/20000, Loss: 0.0000014613748363\n",
      "Epoch: 17380/20000, Loss: 0.0000011350093700\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 17390/20000, Loss: 0.0000008668019404\n",
      "Epoch: 17400/20000, Loss: 0.0000009338486961\n",
      "Epoch: 17410/20000, Loss: 0.0000015671963638\n",
      "Epoch: 17420/20000, Loss: 0.0000070839269029\n",
      "Epoch: 17430/20000, Loss: 0.0000011022301578\n",
      "Epoch: 17440/20000, Loss: 0.0000010531072121\n",
      "Epoch: 17450/20000, Loss: 0.0000010917144664\n",
      "Epoch: 17460/20000, Loss: 0.0000008390992434\n",
      "Epoch: 17470/20000, Loss: 0.0000007547563428\n",
      "Epoch: 17480/20000, Loss: 0.0000010085776694\n",
      "Epoch: 17490/20000, Loss: 0.0000064610530899\n",
      "Epoch: 17500/20000, Loss: 0.0000160457457241\n",
      "Epoch: 17510/20000, Loss: 0.0000042526248762\n",
      "Epoch: 17520/20000, Loss: 0.0000021544656192\n",
      "Epoch: 17530/20000, Loss: 0.0000010034834759\n",
      "Epoch: 17540/20000, Loss: 0.0000007928983905\n",
      "Epoch: 17550/20000, Loss: 0.0000007130230415\n",
      "Epoch: 17560/20000, Loss: 0.0000006705361102\n",
      "Epoch: 17570/20000, Loss: 0.0000006637576462\n",
      "Epoch: 17580/20000, Loss: 0.0000006582152423\n",
      "Epoch: 17590/20000, Loss: 0.0000006923592082\n",
      "Epoch: 17600/20000, Loss: 0.0000034429569951\n",
      "Epoch: 17610/20000, Loss: 0.0000099124235931\n",
      "Epoch: 17620/20000, Loss: 0.0000058351429288\n",
      "Epoch: 17630/20000, Loss: 0.0000014363554328\n",
      "Epoch: 17640/20000, Loss: 0.0000009367503253\n",
      "Epoch: 17650/20000, Loss: 0.0000009043939144\n",
      "Epoch: 17660/20000, Loss: 0.0000006886432402\n",
      "Epoch: 17670/20000, Loss: 0.0000006640818242\n",
      "Epoch: 17680/20000, Loss: 0.0000006376725423\n",
      "Epoch: 17690/20000, Loss: 0.0000006340560503\n",
      "Epoch: 17700/20000, Loss: 0.0000006444294627\n",
      "Epoch: 17710/20000, Loss: 0.0000015236317950\n",
      "Epoch: 17720/20000, Loss: 0.0000235234820138\n",
      "Epoch: 17730/20000, Loss: 0.0000020956176741\n",
      "Epoch: 17740/20000, Loss: 0.0000027053474696\n",
      "Epoch: 17750/20000, Loss: 0.0000011669770856\n",
      "Epoch: 17760/20000, Loss: 0.0000007050873592\n",
      "Epoch: 17770/20000, Loss: 0.0000007052624369\n",
      "Epoch: 17780/20000, Loss: 0.0000006343222481\n",
      "Epoch: 17790/20000, Loss: 0.0000006213027746\n",
      "Epoch: 17800/20000, Loss: 0.0000006152577612\n",
      "Epoch: 17810/20000, Loss: 0.0000006324617061\n",
      "Epoch: 17820/20000, Loss: 0.0000012906333495\n",
      "Epoch: 17830/20000, Loss: 0.0000168821206898\n",
      "Epoch: 17840/20000, Loss: 0.0000058159685068\n",
      "Epoch: 17850/20000, Loss: 0.0000013590937442\n",
      "Epoch: 17860/20000, Loss: 0.0000011886081666\n",
      "Epoch: 17870/20000, Loss: 0.0000008443056458\n",
      "Epoch: 17880/20000, Loss: 0.0000006120841931\n",
      "Epoch: 17890/20000, Loss: 0.0000006044532483\n",
      "Epoch: 17900/20000, Loss: 0.0000005992033607\n",
      "Epoch: 17910/20000, Loss: 0.0000005906463798\n",
      "Epoch: 17920/20000, Loss: 0.0000005881019547\n",
      "Epoch: 17930/20000, Loss: 0.0000006347981412\n",
      "Epoch: 17940/20000, Loss: 0.0000023615425562\n",
      "Epoch: 17950/20000, Loss: 0.0000085274714365\n",
      "Epoch: 17960/20000, Loss: 0.0000031824972666\n",
      "Epoch: 17970/20000, Loss: 0.0000011418811710\n",
      "Epoch: 17980/20000, Loss: 0.0000012140648096\n",
      "Epoch: 17990/20000, Loss: 0.0000008660672961\n",
      "Epoch: 18000/20000, Loss: 0.0000006542317692\n",
      "Epoch: 18010/20000, Loss: 0.0000006108090247\n",
      "Epoch: 18020/20000, Loss: 0.0000006098296126\n",
      "Epoch: 18030/20000, Loss: 0.0000023015659281\n",
      "Epoch: 18040/20000, Loss: 0.0000172621694219\n",
      "Epoch: 18050/20000, Loss: 0.0000047938397074\n",
      "Epoch: 18060/20000, Loss: 0.0000011273887139\n",
      "Epoch: 18070/20000, Loss: 0.0000010426992958\n",
      "Epoch: 18080/20000, Loss: 0.0000006209109529\n",
      "Epoch: 18090/20000, Loss: 0.0000006117632552\n",
      "Epoch: 18100/20000, Loss: 0.0000005635310458\n",
      "Epoch: 18110/20000, Loss: 0.0000005616823842\n",
      "Epoch: 18120/20000, Loss: 0.0000005549191542\n",
      "Epoch: 18130/20000, Loss: 0.0000005506819889\n",
      "Epoch: 18140/20000, Loss: 0.0000005491726824\n",
      "Epoch: 18150/20000, Loss: 0.0000005997301855\n",
      "Epoch: 18160/20000, Loss: 0.0000029550253657\n",
      "Epoch: 18170/20000, Loss: 0.0000076414607975\n",
      "Epoch: 18180/20000, Loss: 0.0000045416500143\n",
      "Epoch: 18190/20000, Loss: 0.0000013853747305\n",
      "Epoch: 18200/20000, Loss: 0.0000009243053114\n",
      "Epoch: 18210/20000, Loss: 0.0000006982344303\n",
      "Epoch: 18220/20000, Loss: 0.0000005917580665\n",
      "Epoch: 18230/20000, Loss: 0.0000005578014566\n",
      "Epoch: 18240/20000, Loss: 0.0000007152245303\n",
      "Epoch: 18250/20000, Loss: 0.0000074927038440\n",
      "Epoch: 18260/20000, Loss: 0.0000016061632095\n",
      "Epoch: 18270/20000, Loss: 0.0000041640651034\n",
      "Epoch: 18280/20000, Loss: 0.0000008598552768\n",
      "Epoch: 18290/20000, Loss: 0.0000007940050750\n",
      "Epoch: 18300/20000, Loss: 0.0000006956082643\n",
      "Epoch: 18310/20000, Loss: 0.0000005437610753\n",
      "Epoch: 18320/20000, Loss: 0.0000005432296462\n",
      "Epoch: 18330/20000, Loss: 0.0000009955156202\n",
      "Epoch: 18340/20000, Loss: 0.0000074859872257\n",
      "Epoch: 18350/20000, Loss: 0.0000024139305879\n",
      "Epoch: 18360/20000, Loss: 0.0000010468379514\n",
      "Epoch: 18370/20000, Loss: 0.0000008993316669\n",
      "Epoch: 18380/20000, Loss: 0.0000031201436741\n",
      "Epoch: 18390/20000, Loss: 0.0000061861655922\n",
      "Epoch: 18400/20000, Loss: 0.0000022270032787\n",
      "Epoch: 18410/20000, Loss: 0.0000008312392197\n",
      "Epoch: 18420/20000, Loss: 0.0000007762680525\n",
      "Epoch: 18430/20000, Loss: 0.0000005648348065\n",
      "Epoch: 18440/20000, Loss: 0.0000006233314593\n",
      "Epoch: 18450/20000, Loss: 0.0000009029129728\n",
      "Epoch: 18460/20000, Loss: 0.0000058667560552\n",
      "Epoch: 18470/20000, Loss: 0.0000040458435251\n",
      "Epoch: 18480/20000, Loss: 0.0000019770855033\n",
      "Epoch: 18490/20000, Loss: 0.0000012731784409\n",
      "Epoch: 18500/20000, Loss: 0.0000008166938983\n",
      "Epoch: 18510/20000, Loss: 0.0000006152054084\n",
      "Epoch: 18520/20000, Loss: 0.0000005524833568\n",
      "Epoch: 18530/20000, Loss: 0.0000007410913554\n",
      "Epoch: 18540/20000, Loss: 0.0000068330950853\n",
      "Epoch: 18550/20000, Loss: 0.0000028394799756\n",
      "Epoch: 18560/20000, Loss: 0.0000032162738535\n",
      "Epoch: 18570/20000, Loss: 0.0000010820808711\n",
      "Epoch: 18580/20000, Loss: 0.0000006476019507\n",
      "Epoch: 18590/20000, Loss: 0.0000008558603781\n",
      "Epoch: 18600/20000, Loss: 0.0000044420789891\n",
      "Epoch: 18610/20000, Loss: 0.0000037207316836\n",
      "Epoch: 18620/20000, Loss: 0.0000017334544964\n",
      "Epoch: 18630/20000, Loss: 0.0000016389709572\n",
      "Epoch: 18640/20000, Loss: 0.0000009456015277\n",
      "Epoch: 18650/20000, Loss: 0.0000006863052135\n",
      "Epoch: 18660/20000, Loss: 0.0000006777754038\n",
      "Epoch: 18670/20000, Loss: 0.0000008092042663\n",
      "Epoch: 18680/20000, Loss: 0.0000025491856377\n",
      "Epoch: 18690/20000, Loss: 0.0000037201127725\n",
      "Epoch: 18700/20000, Loss: 0.0000011952829482\n",
      "Epoch: 18710/20000, Loss: 0.0000009989599903\n",
      "Epoch: 18720/20000, Loss: 0.0000011643149946\n",
      "Epoch: 18730/20000, Loss: 0.0000020295628929\n",
      "Epoch: 18740/20000, Loss: 0.0000044060125219\n",
      "Epoch: 18750/20000, Loss: 0.0000009082016277\n",
      "Epoch: 18760/20000, Loss: 0.0000018072826151\n",
      "Epoch: 18770/20000, Loss: 0.0000046391264732\n",
      "Epoch: 18780/20000, Loss: 0.0000022853425889\n",
      "Epoch: 18790/20000, Loss: 0.0000010449729189\n",
      "Epoch: 18800/20000, Loss: 0.0000005347977776\n",
      "Epoch: 18810/20000, Loss: 0.0000006089015869\n",
      "Epoch: 18820/20000, Loss: 0.0000026684892873\n",
      "Epoch: 18830/20000, Loss: 0.0000133009252750\n",
      "Epoch: 18840/20000, Loss: 0.0000019366420929\n",
      "Epoch: 18850/20000, Loss: 0.0000015992774252\n",
      "Epoch: 18860/20000, Loss: 0.0000011500109167\n",
      "Epoch: 18870/20000, Loss: 0.0000004793877793\n",
      "Epoch: 18880/20000, Loss: 0.0000005519548836\n",
      "Epoch: 18890/20000, Loss: 0.0000004642366775\n",
      "Epoch: 18900/20000, Loss: 0.0000004756274734\n",
      "Epoch: 18910/20000, Loss: 0.0000005888681471\n",
      "Epoch: 18920/20000, Loss: 0.0000048614365369\n",
      "Epoch: 18930/20000, Loss: 0.0000023094819426\n",
      "Epoch: 18940/20000, Loss: 0.0000022023398287\n",
      "Epoch: 18950/20000, Loss: 0.0000013349977053\n",
      "Epoch: 18960/20000, Loss: 0.0000006190838917\n",
      "Epoch: 18970/20000, Loss: 0.0000005371704788\n",
      "Epoch: 18980/20000, Loss: 0.0000005296158179\n",
      "Epoch: 18990/20000, Loss: 0.0000010297992503\n",
      "Epoch: 19000/20000, Loss: 0.0000057356060097\n",
      "Epoch: 19010/20000, Loss: 0.0000050364087656\n",
      "Epoch: 19020/20000, Loss: 0.0000017774582375\n",
      "Epoch: 19030/20000, Loss: 0.0000005625414019\n",
      "Epoch: 19040/20000, Loss: 0.0000007201092558\n",
      "Epoch: 19050/20000, Loss: 0.0000006220606110\n",
      "Epoch: 19060/20000, Loss: 0.0000007404238431\n",
      "Epoch: 19070/20000, Loss: 0.0000032905504668\n",
      "Epoch: 19080/20000, Loss: 0.0000075953525993\n",
      "Epoch: 19090/20000, Loss: 0.0000033595015339\n",
      "Epoch: 19100/20000, Loss: 0.0000017866761937\n",
      "Epoch: 19110/20000, Loss: 0.0000014229457292\n",
      "Epoch: 19120/20000, Loss: 0.0000011557997368\n",
      "Epoch: 19130/20000, Loss: 0.0000006409023854\n",
      "Epoch: 19140/20000, Loss: 0.0000005059285400\n",
      "Epoch: 19150/20000, Loss: 0.0000005121528943\n",
      "Epoch: 19160/20000, Loss: 0.0000011300174947\n",
      "Epoch: 19170/20000, Loss: 0.0000098962937045\n",
      "Epoch: 19180/20000, Loss: 0.0000096068761195\n",
      "Epoch: 19190/20000, Loss: 0.0000019090532533\n",
      "Epoch: 19200/20000, Loss: 0.0000008888629282\n",
      "Epoch: 19210/20000, Loss: 0.0000007034177543\n",
      "Epoch: 19220/20000, Loss: 0.0000004809881489\n",
      "Epoch: 19230/20000, Loss: 0.0000005073703164\n",
      "Epoch: 19240/20000, Loss: 0.0000008575507877\n",
      "Epoch: 19250/20000, Loss: 0.0000067437968028\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 19260/20000, Loss: 0.0000044193739086\n",
      "Epoch: 19270/20000, Loss: 0.0000018917644411\n",
      "Epoch: 19280/20000, Loss: 0.0000009216243484\n",
      "Epoch: 19290/20000, Loss: 0.0000006867124398\n",
      "Epoch: 19300/20000, Loss: 0.0000007279468264\n",
      "Epoch: 19310/20000, Loss: 0.0000028446220313\n",
      "Epoch: 19320/20000, Loss: 0.0000077261101978\n",
      "Epoch: 19330/20000, Loss: 0.0000034741142372\n",
      "Epoch: 19340/20000, Loss: 0.0000015509666582\n",
      "Epoch: 19350/20000, Loss: 0.0000008158614264\n",
      "Epoch: 19360/20000, Loss: 0.0000004974666012\n",
      "Epoch: 19370/20000, Loss: 0.0000005542364079\n",
      "Epoch: 19380/20000, Loss: 0.0000019207591322\n",
      "Epoch: 19390/20000, Loss: 0.0000054788743000\n",
      "Epoch: 19400/20000, Loss: 0.0000060953780121\n",
      "Epoch: 19410/20000, Loss: 0.0000013582404108\n",
      "Epoch: 19420/20000, Loss: 0.0000008318204436\n",
      "Epoch: 19430/20000, Loss: 0.0000005845388387\n",
      "Epoch: 19440/20000, Loss: 0.0000004944359944\n",
      "Epoch: 19450/20000, Loss: 0.0000006782111086\n",
      "Epoch: 19460/20000, Loss: 0.0000072902694228\n",
      "Epoch: 19470/20000, Loss: 0.0000008594490737\n",
      "Epoch: 19480/20000, Loss: 0.0000022818176149\n",
      "Epoch: 19490/20000, Loss: 0.0000012734807342\n",
      "Epoch: 19500/20000, Loss: 0.0000005988762268\n",
      "Epoch: 19510/20000, Loss: 0.0000009806191201\n",
      "Epoch: 19520/20000, Loss: 0.0000088495144155\n",
      "Epoch: 19530/20000, Loss: 0.0000022538652047\n",
      "Epoch: 19540/20000, Loss: 0.0000007073039114\n",
      "Epoch: 19550/20000, Loss: 0.0000005729903023\n",
      "Epoch: 19560/20000, Loss: 0.0000004964234108\n",
      "Epoch: 19570/20000, Loss: 0.0000004530439810\n",
      "Epoch: 19580/20000, Loss: 0.0000005308732511\n",
      "Epoch: 19590/20000, Loss: 0.0000030308219721\n",
      "Epoch: 19600/20000, Loss: 0.0000070580040301\n",
      "Epoch: 19610/20000, Loss: 0.0000021743567231\n",
      "Epoch: 19620/20000, Loss: 0.0000006523499110\n",
      "Epoch: 19630/20000, Loss: 0.0000006010743050\n",
      "Epoch: 19640/20000, Loss: 0.0000004426494229\n",
      "Epoch: 19650/20000, Loss: 0.0000004292753317\n",
      "Epoch: 19660/20000, Loss: 0.0000005769138625\n",
      "Epoch: 19670/20000, Loss: 0.0000039170631680\n",
      "Epoch: 19680/20000, Loss: 0.0000068972440204\n",
      "Epoch: 19690/20000, Loss: 0.0000014502004433\n",
      "Epoch: 19700/20000, Loss: 0.0000010659633745\n",
      "Epoch: 19710/20000, Loss: 0.0000008043079447\n",
      "Epoch: 19720/20000, Loss: 0.0000005624216897\n",
      "Epoch: 19730/20000, Loss: 0.0000008210875535\n",
      "Epoch: 19740/20000, Loss: 0.0000070739556577\n",
      "Epoch: 19750/20000, Loss: 0.0000025270303468\n",
      "Epoch: 19760/20000, Loss: 0.0000011883186062\n",
      "Epoch: 19770/20000, Loss: 0.0000006727763093\n",
      "Epoch: 19780/20000, Loss: 0.0000005203058322\n",
      "Epoch: 19790/20000, Loss: 0.0000006300041377\n",
      "Epoch: 19800/20000, Loss: 0.0000036329424802\n",
      "Epoch: 19810/20000, Loss: 0.0000044084131332\n",
      "Epoch: 19820/20000, Loss: 0.0000010902502936\n",
      "Epoch: 19830/20000, Loss: 0.0000005459511954\n",
      "Epoch: 19840/20000, Loss: 0.0000004632573223\n",
      "Epoch: 19850/20000, Loss: 0.0000005111232326\n",
      "Epoch: 19860/20000, Loss: 0.0000021815249056\n",
      "Epoch: 19870/20000, Loss: 0.0000027501052955\n",
      "Epoch: 19880/20000, Loss: 0.0000036929109228\n",
      "Epoch: 19890/20000, Loss: 0.0000009011239399\n",
      "Epoch: 19900/20000, Loss: 0.0000009998060477\n",
      "Epoch: 19910/20000, Loss: 0.0000005196662300\n",
      "Epoch: 19920/20000, Loss: 0.0000004053174507\n",
      "Epoch: 19930/20000, Loss: 0.0000004775750426\n",
      "Epoch: 19940/20000, Loss: 0.0000021873904643\n",
      "Epoch: 19950/20000, Loss: 0.0000164410903380\n",
      "Epoch: 19960/20000, Loss: 0.0000026112147680\n",
      "Epoch: 19970/20000, Loss: 0.0000012020568647\n",
      "Epoch: 19980/20000, Loss: 0.0000010916985502\n",
      "Epoch: 19990/20000, Loss: 0.0000004005285632\n",
      "Epoch: 20000/20000, Loss: 0.0000004380251823\n"
     ]
    }
   ],
   "source": [
    "# Create LEM instance\n",
    "lem = LEM(input_size, hidden_size, output_size, dt=0.5)\n",
    "\n",
    "# Loss and optimizer\n",
    "criterion = nn.MSELoss()\n",
    "optimizer = torch.optim.Adam(lem.parameters(), lr=0.001)\n",
    "\n",
    "# Training loop\n",
    "for epoch in range(num_epochs):\n",
    "    # Forward pass\n",
    "    output = lem(input_tensor)\n",
    "    loss = criterion(output, target_tensor)\n",
    "\n",
    "    # Backward and optimize\n",
    "    optimizer.zero_grad()\n",
    "    loss.backward()\n",
    "    optimizer.step()\n",
    "\n",
    "    # Print progress\n",
    "    if (epoch + 1) % 10 == 0:\n",
    "        print(f'Epoch: {epoch + 1}/{num_epochs}, Loss: {loss.item():.16f}')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "1da66d64",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "torch.Size([1, 1, 256])\n",
      "torch.Size([1, 20, 256])\n"
     ]
    }
   ],
   "source": [
    "print(test_tensor.shape)\n",
    "prediction_tensor = torch.zeros(1, 20, 256).float()\n",
    "print(prediction_tensor.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "a0543daa",
   "metadata": {},
   "outputs": [],
   "source": [
    "with torch.no_grad():\n",
    "    prediction = lem(test_tensor)\n",
    "    prediction = prediction.view(1, 1, 256).float()\n",
    "    prediction_tensor[:, 0, :] = prediction\n",
    "    for i in range(19):\n",
    "        prediction = lem(prediction)\n",
    "        prediction = prediction.view(1, 1, 256).float()\n",
    "        prediction_tensor[:, i+1, :] = prediction\n",
    "        "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2e6b9bad",
   "metadata": {},
   "source": [
    "### Four different types of error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "9c33b0f5",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Exact Solution\n",
    "\n",
    "u_test = u_1.T\n",
    "u_test_full = u_test[80:100, :]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "00c8fa22",
   "metadata": {},
   "outputs": [],
   "source": [
    "prediction_tensor = torch.squeeze(prediction_tensor)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "334bf0be",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "torch.Size([20, 256])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Extrapolation\n",
    "\n",
    "k1 = ( prediction_tensor - u_test_full)**2\n",
    "u_test_full_tensor = torch.tensor(u_test_full**2)\n",
    "u_test_full_tensor.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "01080c4f",
   "metadata": {},
   "source": [
    "### L^2 norm error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "33c17bd8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Relative Error Test:  0.010644946523613044 %\n"
     ]
    }
   ],
   "source": [
    "# Compute the relative L2 error norm (generalization error)\n",
    "relative_error_test = torch.mean(k1)/ torch.mean(u_test_full_tensor)\n",
    "\n",
    "print(\"Relative Error Test: \", relative_error_test.item(), \"%\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "c0cad35a",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (4209523232.py, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[0;36m  File \u001b[0;32m\"/tmp/ipykernel_23511/4209523232.py\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m    2+\u001b[0m\n\u001b[0m      ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "2+"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fa3fa35b",
   "metadata": {},
   "source": [
    "### Max absolute norm error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "01cf8637",
   "metadata": {},
   "outputs": [],
   "source": [
    "R_abs = torch.max(torch.abs(prediction_tensor - u_test_full))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b3e65482",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(R_abs)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "678810f2",
   "metadata": {},
   "source": [
    "### Explained variance score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "02c72385",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "\n",
    "a = prediction_tensor\n",
    "b = u_test_full\n",
    "# Assuming 'a' is your predicted values (model's predictions) and 'b' is the true values (ground truth)\n",
    "# Make sure 'a' and 'b' are PyTorch tensors\n",
    "# a = torch.tensor(a)\n",
    "b = torch.tensor(b)\n",
    "# Calculate the mean of 'b'\n",
    "mean_b = torch.mean(b)\n",
    "\n",
    "# Calculate the Explained Variance Score\n",
    "numerator = torch.var(b - a)  # Variance of the differences between 'b' and 'a'\n",
    "denominator = torch.var(b)    # Variance of 'b'\n",
    "evs = 1 - numerator / denominator\n",
    "\n",
    "print(\"Explained Variance Score:\", evs.item())"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f664baf6",
   "metadata": {},
   "source": [
    "### Mean absolute error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "43fc2394",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Compute the relative L2 error norm (generalization error)\n",
    "relative_error_test = torch.mean(torch.abs(prediction_tensor - u_test_full))\n",
    "\n",
    "print(\"Relative Error Test: \", relative_error_test, \"%\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "75e50e9e",
   "metadata": {},
   "source": [
    "### Contour plot for PINN (80 percent) and (20 percentage lem prediction)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8e3eec75",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(prediction_tensor.shape)\n",
    "prediction_tensor = torch.squeeze(prediction_tensor)\n",
    "input_tensor = torch.squeeze(input_tensor)\n",
    "\n",
    "conc_u = torch.squeeze(input_tensor)\n",
    "concatenated_tensor = torch.cat((conc_u, prediction_tensor), dim=0)\n",
    "\n",
    "x1 = np.linspace(-1, 1, 256)\n",
    "t1 = np.linspace(0, 1, 99)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e393a1e0",
   "metadata": {},
   "source": [
    "### Snapshot time plots"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "04f91104",
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import torch\n",
    "\n",
    "# Create the figure and axis objects with reduced width\n",
    "fig, ax = plt.subplots(figsize=(5, 5))  # You can adjust the width (7 inches) and height (5 inches) as needed\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "final_time_output = prediction_tensor[3, :]\n",
    "final_out = final_time_output.detach().numpy().reshape(-1, 1)\n",
    "final_true = u_1[:, 83].reshape(-1, 1)\n",
    "\n",
    "# Plot the data with red and blue lines, one with dotted and one with solid style\n",
    "ax.plot(x, final_out, color='red', linestyle='dotted', linewidth=12, label='Prediction')\n",
    "ax.plot(x, final_true, color='blue', linestyle='solid', linewidth=7, label='True')\n",
    "\n",
    "\n",
    "# Set the axis labels with bold font weight\n",
    "ax.set_xlabel(r\"${x}$\", fontsize=26, color='black', fontdict={'weight': 'bold'})\n",
    "ax.set_ylabel(r\"${u(x, t)}$\", fontsize=26, color='black', fontdict={'weight': 'bold'})\n",
    "\n",
    "# Set the title with bold font weight\n",
    "ax.set_title(r\"${t = 0.83}$\", fontsize=26, color='black', fontweight='bold')\n",
    "\n",
    "# Set the number of ticks for x-axis and y-axis to 3\n",
    "ax.set_xticks([-1, 0, 1])\n",
    "ax.set_yticks([-1, 0, 1])\n",
    "\n",
    "# Set tick labels fontweight to bold and increase font size\n",
    "ax.tick_params(axis='both', which='major', labelsize=20, width=2, length=10)\n",
    "\n",
    "# # Set the fontweight for tick labels to bold\n",
    "# for tick in ax.get_xticklabels() + ax.get_yticklabels():\n",
    "#     tick.set_weight('bold')\n",
    "\n",
    "# Set the spines linewidth to bold\n",
    "ax.spines['top'].set_linewidth(2)\n",
    "ax.spines['right'].set_linewidth(2)\n",
    "ax.spines['bottom'].set_linewidth(2)\n",
    "ax.spines['left'].set_linewidth(2)\n",
    "\n",
    "# Set the legend\n",
    "# ax.legend()\n",
    "\n",
    "plt.savefig('LEM_0.83_20.pdf', dpi=500, bbox_inches=\"tight\")\n",
    "#plt.savefig('lem_0.83_20.png', dpi=500, bbox_inches=\"tight\")\n",
    "# Show the plot\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3d96305e",
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import torch\n",
    "\n",
    "# Create the figure and axis objects with reduced width\n",
    "fig, ax = plt.subplots(figsize=(5, 5))  # You can adjust the width (7 inches) and height (5 inches) as needed\n",
    "\n",
    "\n",
    "\n",
    "final_time_output = prediction_tensor[-2, :]\n",
    "final_out = final_time_output.detach().numpy().reshape(-1, 1)\n",
    "final_true = u_1[:, -2].reshape(-1, 1)\n",
    "\n",
    "# Plot the data with red and blue lines, one with dotted and one with solid style\n",
    "ax.plot(x, final_out, color='red', linestyle='dotted', linewidth=12, label='Prediction')\n",
    "ax.plot(x, final_true, color='blue', linestyle='solid', linewidth=7, label='True')\n",
    "\n",
    "\n",
    "# Set the axis labels with bold font weight\n",
    "ax.set_xlabel(r\"${x}$\", fontsize=26, color='black', fontdict={'weight': 'bold'})\n",
    "ax.set_ylabel(r\"${u(x, t)}$\", fontsize=26, color='black', fontdict={'weight': 'bold'})\n",
    "\n",
    "# Set the title with bold font weight\n",
    "ax.set_title(r\"${t = 0.98}$\", fontsize=26, color='black', fontweight='bold')\n",
    "\n",
    "# Set the number of ticks for x-axis and y-axis to 3\n",
    "ax.set_xticks([-1, 0, 1])\n",
    "ax.set_yticks([-1, 0, 1])\n",
    "\n",
    "# Set tick labels fontweight to bold and increase font size\n",
    "ax.tick_params(axis='both', which='major', labelsize=20, width=2, length=10)\n",
    "\n",
    "# # Set the fontweight for tick labels to bold\n",
    "# for tick in ax.get_xticklabels() + ax.get_yticklabels():\n",
    "#     tick.set_weight('bold')\n",
    "\n",
    "# Set the spines linewidth to bold\n",
    "ax.spines['top'].set_linewidth(2)\n",
    "ax.spines['right'].set_linewidth(2)\n",
    "ax.spines['bottom'].set_linewidth(2)\n",
    "ax.spines['left'].set_linewidth(2)\n",
    "\n",
    "# Set the legend\n",
    "# ax.legend()\n",
    "\n",
    "plt.savefig('LEM_0.98_20.pdf', dpi=500, bbox_inches=\"tight\")\n",
    "#plt.savefig('lem_0.98_20.png', dpi=500, bbox_inches=\"tight\")\n",
    "# Show the plot\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d962cd38",
   "metadata": {},
   "source": [
    "### Contour plot where 80 percent for PINN solution and 20 percent for lem solution"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5011fef9",
   "metadata": {},
   "source": [
    "### Exact contour"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8d6ac2bb",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from matplotlib.ticker import FixedLocator\n",
    "\n",
    "# Assuming you have defined concatenated_tensor as a PyTorch tensor\n",
    "# concatenated_tensor = torch.cat((tensor1, tensor2), dim=0)\n",
    "\n",
    "# Convert concatenated_tensor to a NumPy array\n",
    "concatenated_array = u_1.T\n",
    "\n",
    "# Define custom color levels\n",
    "x = np.linspace(-1, 1, concatenated_array.shape[1])  # Replace 0 and 1 with your actual x range\n",
    "t = np.linspace(0, 1, concatenated_array.shape[0])  # Replace 0 and 1 with your actual t range\n",
    "X, T = np.meshgrid(x, t)\n",
    "\n",
    "# Define custom color levels using the minimum and maximum from the NumPy array\n",
    "c_levels = np.linspace(np.min(concatenated_array), np.max(concatenated_array), 400)\n",
    "\n",
    "# Plot the contour with interpolated data\n",
    "plt.figure(figsize=(20, 5))\n",
    "plt.pcolormesh(T, X, concatenated_array, shading='auto', cmap='coolwarm')\n",
    "\n",
    "# Set the fontweight for axis labels to regular (not bold)\n",
    "plt.xlabel(\"$t$\", fontsize=26)\n",
    "plt.ylabel(\"$x$\", fontsize=26)\n",
    "plt.title(\"$u(x, t)$\", fontsize=26)\n",
    "\n",
    "# Set tick labels fontweight to regular (not bold) and increase font size\n",
    "plt.tick_params(axis='both', which='major', labelsize=20, width=3, length=10)\n",
    "\n",
    "# Set the fontweight for tick labels to regular (not bold)\n",
    "for tick in plt.gca().get_xticklabels() + plt.gca().get_yticklabels():\n",
    "    tick.set_weight('normal')\n",
    "\n",
    "# Set the number of ticks for x-axis and y-axis to 5\n",
    "num_ticks = 5\n",
    "x_ticks = np.linspace(np.min(T), np.max(T), num_ticks)\n",
    "y_ticks = np.linspace(np.min(X), np.max(X), num_ticks)\n",
    "\n",
    "plt.gca().xaxis.set_major_locator(FixedLocator(x_ticks))\n",
    "plt.gca().yaxis.set_major_locator(FixedLocator(y_ticks))\n",
    "\n",
    "cbar1 = plt.colorbar()\n",
    "# Set the number of ticks for the color bar with uniformly distributed numbers\n",
    "num_ticks = 5\n",
    "c_ticks = np.linspace(np.min(concatenated_array), np.max(concatenated_array), num_ticks)\n",
    "cbar1.set_ticks(c_ticks)\n",
    "\n",
    "# Set the fontweight and fontsize for color bar tick labels\n",
    "for t in cbar1.ax.get_yticklabels():\n",
    "    t.set_weight('normal')\n",
    "    t.set_fontsize(26)  # Increase the font size for color bar tick labels\n",
    "\n",
    "# Increase the size of numbers on axis and color bar\n",
    "plt.xticks(fontsize=26)\n",
    "plt.yticks(fontsize=26)\n",
    "\n",
    "# Increase the tick size and width of the color bar\n",
    "cbar1.ax.tick_params(axis='both', which='major', labelsize=30, width=3,  length=10)\n",
    "\n",
    "#plt.savefig('Contour_Exact.pdf', dpi=500, bbox_inches=\"tight\")\n",
    "plt.savefig('contour_exact.jpeg', dpi=500, bbox_inches=\"tight\")\n",
    "# Show the plot\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c034dcf7",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from matplotlib.ticker import FixedLocator\n",
    "\n",
    "# Assuming you have defined concatenated_tensor as a PyTorch tensor\n",
    "# concatenated_tensor = torch.cat((tensor1, tensor2), dim=0)\n",
    "\n",
    "# Convert concatenated_tensor to a NumPy array\n",
    "concatenated_array = concatenated_tensor.numpy()\n",
    "\n",
    "# Define custom color levels\n",
    "x = np.linspace(-1, 1, concatenated_array.shape[1])  # Replace 0 and 1 with your actual x range\n",
    "t = np.linspace(0, 1, concatenated_array.shape[0])  # Replace 0 and 1 with your actual t range\n",
    "X, T = np.meshgrid(x, t1)\n",
    "\n",
    "# Define custom color levels using the minimum and maximum from the NumPy array\n",
    "c_levels = np.linspace(np.min(concatenated_array), np.max(concatenated_array), 400)\n",
    "\n",
    "# Plot the contour with interpolated data\n",
    "plt.figure(figsize=(20, 5))\n",
    "plt.pcolormesh(T, X, concatenated_array, shading='auto', cmap='coolwarm')\n",
    "\n",
    "# Set the fontweight for axis labels to regular (not bold)\n",
    "plt.xlabel(\"$t$\", fontsize=26)\n",
    "plt.ylabel(\"$x$\", fontsize=26)\n",
    "plt.title(\"$u(x, t)$\", fontsize=26)\n",
    "\n",
    "# Set tick labels fontweight to regular (not bold) and increase font size\n",
    "plt.tick_params(axis='both', which='major', labelsize=20, width=3, length=10)\n",
    "\n",
    "# Set the fontweight for tick labels to regular (not bold)\n",
    "for tick in plt.gca().get_xticklabels() + plt.gca().get_yticklabels():\n",
    "    tick.set_weight('normal')\n",
    "\n",
    "# Set the number of ticks for x-axis and y-axis to 5\n",
    "num_ticks = 5\n",
    "x_ticks = np.linspace(np.min(T), np.max(T), num_ticks)\n",
    "y_ticks = np.linspace(np.min(X), np.max(X), num_ticks)\n",
    "\n",
    "plt.gca().xaxis.set_major_locator(FixedLocator(x_ticks))\n",
    "plt.gca().yaxis.set_major_locator(FixedLocator(y_ticks))\n",
    "\n",
    "cbar1 = plt.colorbar()\n",
    "# Set the number of ticks for the color bar with uniformly distributed numbers\n",
    "num_ticks = 5\n",
    "c_ticks = np.linspace(np.min(concatenated_array), np.max(concatenated_array), num_ticks)\n",
    "cbar1.set_ticks(c_ticks)\n",
    "\n",
    "# Set the fontweight and fontsize for color bar tick labels\n",
    "for t in cbar1.ax.get_yticklabels():\n",
    "    t.set_weight('normal')\n",
    "    t.set_fontsize(26)  # Increase the font size for color bar tick labels\n",
    "\n",
    "# Increase the size of numbers on axis and color bar\n",
    "plt.xticks(fontsize=26)\n",
    "plt.yticks(fontsize=26)\n",
    "\n",
    "# Increase the tick size and width of the color bar\n",
    "cbar1.ax.tick_params(axis='both', which='major', labelsize=30, width=3,  length=10)\n",
    "\n",
    "# Add a dotted line at t = 0.8\n",
    "plt.axvline(x=0.8, color='black', linestyle='dotted', linewidth=5)\n",
    "\n",
    "#plt.savefig('Contour_LEM_20.pdf', dpi=500, bbox_inches=\"tight\")\n",
    "plt.savefig('contour_LEM_20.jpeg', dpi=500, bbox_inches=\"tight\")\n",
    "# Show the plot\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b7ab04a2",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
